Forum Discussion
5 Replies
- Zahar_ChernovCreator IIHello, Can you explain what you mean by "differently"? Are you trying to do something like this (example):
You have Part with part number "ASS12345" and revision 1.0 And you want to be able to see "ASS12345 1.0"?
` - Dharmatej34Ideator III would like to have a method, which would change the value based on some rules, just for displaying it to the user. Thanks in advance.
- Zahar_ChernovCreator IITo achieve your functionality you can add server method for "after add" and "after update" events and this method need to update property keyed_name.
- Dharmatej34Ideator IIHi Zahar, Thanks for the reply. I want the property value to be changed and displayed only on the client side. If I have a "after add" or "after update" events, these would get triggered, even if I query the item on server side using AML or API, which would change the property value. So I wanted the property value changed only when it gets displayed in the client. Regards, Dharma
- Zahar_ChernovCreator IIDharma, Then you need to change the event to onBeforeGet to do something like this:
this.setProperty("keyed_name", {new value} ); return this;
This code will only change the value of keyed_name that returned and not actual value in DB But keep in mind that if you will always need to show the same value, so there is no reason not to save it to the keyed_name property once instead running your logic every time that object is returned from the DB.