E9.1 Can't clear grid cell error after returning from custom visual assist

jnginma

Member
Hello,

I have a custom headerless detail form and one of the grid columns has a custom visual assist associated with it. In the "Visual Assist Button Clicked" event, I perform a form interconnect to my custom form. After the form returns, there is also validation code in the same event.

- user uses the visual assist but hits the 'x' to close without selecting value
- validation fails and error is set on the cell (Set Grid Cell Error)
- user then uses the visual assist again, this time selecting a value and returns
- event rules (still in "Visual Assist Button Clicked" event) validates the value returned and then does a (Clear Grid Cell Error)
- however the error is NOT getting cleared on the grid.

I have stepped through using the debugger to confirm that the Clear Grid Cell Error is getting called.

Has anyone seen similar behavior?

Thanks in advance.
 
Try writing the code in post visual assist clicked and see if that works . Since you are on a grid column try on the event like col is exited and changed inline or col is exited and see if that works
 
Hi jnginma,

Since it is not clear to me where the Error is really being set, I am going to spout some generalities in hopes that you think of things to try.

If the error is validated through a DD function, then it is usually the event that triggers the error that clears the error - so if Grid Row Exited "automagically" sets the error, the same action will clear the error (and then re-evaluate). This applies to Control is Exited as well. I have also seen errors not getting cleared until you hit the OK button, because the error was set by the OK button.

If you are evaluating and setting the error through Event Rules - say upon return from the Visual Assist, then I would Clear the error right before entering the Visual Assist, and let the exit handle the re-evaluation (like it did the first time).

An interesting test would be to:
1) user uses the visual assist but hits the 'x' to close without selecting value (Gets the Error)
2) user then uses the visual assist again, this time selecting a value and returns (the Error doesn't go away)
3) (****And this is assuming a valid value is currently in the field) user uses the visual assist but hits the 'x' to close without selecting value (and here is where that "same action that sets the error, clears the error") ?Maybe the error clears?

If that doesn't work, then I would clear the error (probably better to call it 'reset the error') in the ER right before the VA call and then test right after, but I'm afraid this just moves the problem down the road, as if the VA logic sets the error, but the user manually types in the valid value - the clear error would not occur.

If I am writing the ER for the validation, I will typically (well for forms anyway) have a push button that is called on "Control is Exited and Changed - Inline" that handles the set and clear all in that button. After successfully testing it, I will hide it via Hide command in Dialog Is Initialized.

Hope this gives you some ideas,

Ben again,
 
I just wanted to thank you for the replies and also update in case others have the same problem.

To clarify, the error was being set/cleared in my event rules after return from calling my custom form in "Visual Assist Button Clicked".

A couple of things I had tried which didn't change the behavior:
1) Put validation in "Post Visual Assist Clicked"
2) Clear error before calling my custom VA form

I was able to resolve my issue by moving my validation to "Row Exit & Changed..."

Also, just an FYI, I found that when returning from VA the "Col Exited & Changed..." events are not triggered even if a change has happened. According to Oracle, this is as designed...

E1: FDA: Events "Col is Exited, Col Exited & Changed – Inline, Col Exited & Changed - Asynch" Not Triggered After Selecting From Visual Assist And Tabbing Out Of Grid Column On Web Client (Doc ID 1920759.1)

Thanks again.
 
Back
Top