Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bug - Interactive Grid Selection Change event declarative Client Side Condition only works when in Edit mode

Martin FMar 20 2024 — edited Mar 20 2024

Hi all,

I've found that when an Interactive Grid has a Dynamic Action on the Selection Change event, with a Client Side Condition that checks the value of a column, it cannot see the value of the column using the declarative options.

It can be seen using a JS expression so I believe this is a bug with however the DA attempts to retrieve the value for the condition.

The use case where I came across this issue was attempting to use the DA in a Master Detail setup that had multiple Detail regions.

When the Master record had a value indicating there would be no corresponding detail records I wanted to hide the multiple Detail regions that would all say “no records found” or equivalent, and display a single no records found message.

In testing I found

  • The column value is available at the point where the client side condition is executed.
  • This occurs with a single IG and is not affected by the Master Detail setup.
  • The Dynamic Action does work as expected when the IG is in edit mode.

My use case has been solved with alternatives but I believe the declarative client-side condition options are not working as expected so wanted to report this as a bug.

A simplified example with public access is here: https://apex.oracle.com/pls/apex/r/flachm/ig-selection-change-client-side-condition/home?session=6223698025129

The IG on the left presents sample employee data.

A dynamic action on the Selection Change event has a Client Side Condition checking if the Job column = “MANAGER”.

When true it will:

  • Set the “Selection change - The Selected person is a Manager:” field to “Yes they are a manager”
  • Increment the “Selection Change - DA Run count” value

When false it will:

  • Set the “Selection change - The Selected person is a Manager:” field to “No they are not a manager”
  • Increment the “Selection Change - DA Run count” value

If you select different records on the IG outside of edit mode the “Selection Change - DA Run count” field will increase on each selection but will always set the “Selection change - The Selected person is a Manager:” value to “No they are not a manager”.

If you enter Edit mode on the IG and select any column on a record both fields will update as expected and rows where the Job column = “MANAGER” will change the value to “Yes they are a manager”.

If the Client-side Condition Type is set to JavaScript Expression it is possible to do something like:

this.data.model.getValue( this.data.selectedRecords[0], "JOB" ) === "MANAGER"

This will work whether the IG is in edit mode or not which is how I expected the declarative options to behave.

My expected resolution would be for the Dynamic Actions declarative Client-side Condition options to work with the values of the selected row whether the IG is in edit mode or not.

thanks.

This post has been answered by Karel Ekema on Mar 22 2024
Jump to Answer
Comments
Post Details
Added on Mar 20 2024
4 comments
2,651 views