Greetings. I am having a question around DOM element and clicking on a Start button which has the field associated with DOM element passed in as a parameter.
We have a Text Input, which has an "onChange" event which posts the value to memory. (e.g. field is .Customer.CustomerID - Text Input)
We have a "Start" button next to the Text Input which has "onClick" event which calls "Create New Work" and has ".Customer.CustomerID" passed in as one of the parameters to the flow called from Create New Work.
1. We have Pega integrated within a third party application. What they do is pass the Customer ID(1234567890) to the text input and immediately click on Start button, this is not invoking the "onChange" on TextInput but just invokes "onClick" on Start Button.
2. But when invoked Pega Standalone, if i replicate same as what the application does, that is immediately click on Start button i can see both my onChange and onClick being invoked.
From Point 1 we are having issues, .Customer.CustomerID that is being passed as a parameter is sometimes coming as NULL (value is taken directly from DOM element).
Now, my question is, when submitting the form which as a text input, Is there a chance for the value in DOM element to be lost? and that is why we see sometimes null being passed?
I think that On Change would only be triggered if a user actually makes a change in the text input. How exactly are you setting the value in the text input when you state "pass the Customer ID(1234567890) to the text input"?
Something you could try is adding a Refresh Section action to your start button before the "Create New Work". This should post any values to the clipboard.
I have a question here. If, user is not firing the OnChange always, then why are we only relying on the OnChange event? I think while the page is loading, that time only the value should be loaded to the clipboard . It can be done on the flow's first flow action's Pre-Action data transform. Then keep the Onchange as well, so that if user changes the value manually, then also the value gets updated in the clipboard.
Value gets passed from elsewhere and user cannot change it, and even the onClick event was not performed by User, it is performed by the third party application. As values are not posted to clipboard, something when submitting the form via Start button, we are losing DOM values. So wanted to know if this is the expected behaviour of HTML forms