I have a form with an execute button, that calls a webservice to populate a field with data.
I would like to do away with the button, and call the webservice from the change event on a dropdownlist.
How can I do this?
thanks
Solved! Go to Solution.
Views
Replies
Total Likes
The command you want is:
xfa.connectionSet.DataConnectionName.execute(boolean value)
;
Boolean value is true if you want to cause a remerge of the datadom with the template and false if you do not.
I do not recommend running the web service from the change event, I woudl recommend the exit event instead. The user can change their mind while in the list and having multiple web service calls running coudl mess things up. The exit event will only fire when the user leaves the field and that way guarantees their selection.
Paul
Views
Replies
Total Likes
Hi,
You could just try copy the script from the click event in the button to the exit event of the dropdown.
Just need to check the referencing of objects to make sure that the references are complete, taking into account subforms, etc.
Should work,
Niall
Views
Replies
Total Likes
There is no script on the click event in the script editor.
The button calls the webservice from the execute tab on the button object.
Although the click is defined in the xml source
<event activity="click" name="event__click">
<execute connection="DataConnection"/>
</event>
Views
Replies
Total Likes
My bad
The few web service calls I have are all manually scripted in the click event. I dragged a button across and see what you mean.
One work around would be to hide the button and in the exit event of the dropdown have the following javascript firing the click event of the now hidden web service button:
myWebServiceBtn.execEvent("click");
Sorry,
Niall
The command you want is:
xfa.connectionSet.DataConnectionName.execute(boolean value)
;
Boolean value is true if you want to cause a remerge of the datadom with the template and false if you do not.
I do not recommend running the web service from the change event, I woudl recommend the exit event instead. The user can change their mind while in the list and having multiple web service calls running coudl mess things up. The exit event will only fire when the user leaves the field and that way guarantees their selection.
Paul
Views
Replies
Total Likes
Thanks Paul
Niall
Thank you both very much!
Views
Replies
Total Likes