Question
Sberbank
RU
Last activity: 1 Jun 2016 9:20 EDT
OnChange event is triggered at the same time attempt to run Flow-action
Hello!
There is such a situation: in the section, there are two properties (let's call them A and B) and the "Submit" button. On event OnChange in property A, property B will computed. By clicking "Submit" is performing validation properties property B. When the user is entering some value into the text field in property A, and, without taking over from the field, hit "Submit" button, OnChange event is triggered at the same time attempt to run Flow-action, and, as a consequence, with validation. Because OnChange processing is not time to change the context, the validation does not work properly and the user leaves the form of a blank field B.
Could you tell me, please, what I can resolve this problem in solution.
I think the problem can be solved by blocking the "Submit" button for the user triggered Pressed Any Key events for the field A. If it is the normal solution, tell me, please, how it can be done.
Message was edited by: Marissa Rogers - Added Category, moved from Mesh Help
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi
One way could be to use post action activity / data transform to check the value of B based on the inputs in A and if blank then set it.
The other way probably use client side validation for field B not to allow submit without having any value in it . But this will be effective if B is present in your screen.
Sberbank
RU
Thank you for your reply!
I will try to use your proposal with post action activity.
Without tabbing out of property A if we directly submit the button, click event itself will not be honored. For some reason both of them are getting fired for you. Can we have disabled when condition on the button based on property B ?
Sberbank
RU
Thank you for your reply!
But can you explane me more detail what do you mean?
Button control has this disabled when condition. My idea was that you can display the button in disabled mode before property B is populated.
Sberbank
RU
If I do so, there may be a situation like this:
The operator put some value in prorerty A. After that he leaves focus from A. It's cause calculating an filling property B immediatelly. Next. He put new value in property A and press button "Submit". In this case value of property B doesn't calculate and form closes.
Okay. We can make the disabled when condition to fire client side for this scenario.
How about having a Rule Edit Validate on the property rule form itself for property B. This should stop the user from submitting empty value for property B.
Pegasystems Inc.
IN
Hello Mikhail,
Could you please try the below configuration.
On Change of Property A, call 2 actions - Run Script and refresh Section. In run script action, call setBusyIndicator function, which will display a Throbber image on screen. then refresh section will update the UI with the current value.
So, when users clicks on Submit button, the validation configured would considered the latest value.
Please let me know whether it works for your use-case or not.
Thanks!!
Sberbank
RU
Sorry for the long silence. And once again thank you all for your help!
The solution was found, and in the next few days I will write it.
Pegasystems Inc.
IN
Hi Mikhail Balashov,
Glad to know that you have found the resolution for the issue. Appreciate you taking time to update the thread with this information. Sharing the solution on the community will help users who come across a similar question.
Thank you for your participation in the Pega Product Support
~Vidyaranjan A V | Community Moderator | Pegasystems Inc.