In this post, I will be using the isChanged function in a Dynamic Action to hide the Apply Changes button in an Employee Form and show it only after some of the information on the page has changed.
Below is a short video that shows the final product. Notice this works with any type of items:
- Name: Show/Hide Apply Changes on Page Changed
- Event: Change
- Selection Type: JavaScript Expression
- JavaScript Expression: apex.gPageContext$
- Client-Side Condition Type: JavaScript Expression
- JavaScript Expression: apex.page.isChanged()
- True Action
- Action: Show
- Selection Type: Button
- Button: SAVE
- False Action
- Action: Hide
- Selection Type: Button
- Button: SAVE
That’s it! Feel free to login into my Demo Application to try this (Username/Password = Demo/Demo).
It’s possible to apply the same concept based on changes of specific items. The JavaScript apex.item namespace has a similar function and the way to call it would be:
apex.item(‘Px_ITEM_NAME’).isChanged();
Until next time.
This tip works great. I implemented the apex.item(‘Px_ITEM_NAME’).isChanged(); feature. I was 7 days trying to accomplish this goal. Thank you for this tip.
ReplyDelete