Ask Your Question
3

How can a dynamic action using JS be used in Oracle Apex to activate/deactivate an item?

asked 2021-11-12 11:00:00 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-11-02 21:00:00 +0000

qstack gravatar image

To activate/deactivate an item in Oracle Apex using dynamic action using JS, follow the steps below:

  1. On the page designer, select the item that needs to be activated/deactivated.

  2. Click on the 'Create Dynamic Action' button.

  3. In the 'Create Dynamic Action' dialog box, enter a name for the dynamic action.

  4. Under 'When Event Occurs' select the event that should trigger the dynamic action.

  5. Under 'True Action' click on the 'Add' button and select 'Execute JavaScript Code' from the list of actions.

  6. In the 'Execute JavaScript Code' dialog box that appears, enter the following code snippet to activate or deactivate the item:

    $s('ITEMNAME', 'VALUETO_SET');

    Replace 'ITEMNAME' with the name of the item and 'VALUETO_SET' with the value that you want to set for the item.

    To activate the item, set the value to 'show' and to deactivate the item, set the value to 'hide'.

  7. Click on the 'OK' button to save the dynamic action.

  8. Run the page and test the dynamic action by triggering the event that you selected in step 4. The item should be successfully activated/deactivated based on the code that you entered in step 6.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-11-12 11:00:00 +0000

Seen: 9 times

Last updated: Nov 02 '21