Phaphathi Hlaka
Phaphathi Hlaka

Reputation: 1

Dynamic Action Not Working in Oracle APEX

I'm trying to create a dynamic action in Oracle APEX to refresh the P1_ORGANIZATION_ID item based on changes to the P1_ORGANIZATION_TYPE item. However, I'm having trouble finding the correct settings. I've checked the Oracle APEX documentation, but the instructions seem to assume a different page layout.

  1. I've set the "Selection Type" to "Item" and specified P1_ORGANIZATION_TYPE as the affected item.

  2. I've checked the "Rendering" pane in Page Designer, but I only see "Pre-Rendering" and "Post-Rendering" sections. I've tried clicking the "Show All" button, but it doesn't seem to make a difference.

  3. I've verified that I'm using the correct version of Oracle APEX (24.2).

The dynamic action is not working as expected. When I change the P1_ORGANIZATION_TYPE item, the P1_ORGANIZATION_ID item is not refreshed. I've checked the browser console for errors, but I don't see any relevant messages.

Upvotes: 0

Views: 31

Answers (1)

Littlefoot
Littlefoot

Reputation: 143033

It seems that you did it just the opposite of what you should have done.

Dynamic action's (DA) properties should be:

  • when
    • event = change
    • selection type = item
    • item = P1_ORGANIZATION_TYPE --> because DA is supposed to do "something" when this item's value changes
  • true action = refresh
    • selection type = item
    • item = P1_ORGANIZATION_ID --> because ID is supposed to change once you modify the TYPE information

On the other hand, you didn't say what exactly you're "refreshing" here. Is P1_ORGANIZATION_ID, by any chance a select list item (the one that has list of values attached to it)? If so, then you don't need dynamic action - navigate to P1_ORGANIZATION_ID's property palette (right-hand side of the screen) and set "parent item" property (under "Cascading list of values section) to P1_ORGANIZATION_TYPE, which means that list of values will be modified accordingly to type change.

Also, don't forget to include P1_ORGANIZATION_TYPE into LoV's WHERE clause!

Upvotes: 0

Related Questions