Is there a way to call Web Request - Post method on drop down change event in Nintex Forms ?
This is my scenario,
I have two drop downs on my form,
Drop-down A : User makes a selection
Drop-down B : need to be populated based of selection in Drop-down A
Note : Drop-down B is in repeating section
In the back-end once user makes a selection, I need to query a tool to retrieve data, below is my POST configuration :
Web Service URL : https://domain.com/axis/services/
I have configured the same in 'Web Request Control - POST method', and it's working fine. My issue is,
1) How to extract the single record / multiple records from the response shown above ?
2) How to populate Drop-down B, with all the values under //DATA/Row id="1"/<D n="7797">, on drop-down A change event.
Can someone please assist ?
Caroline Jung, I have gone through few of your threads, is this something you can help me with ? Appreciate your help.
Solved! Go to Solution.
You'll need to figure out the XPath expression to pull out that data from the XML that comes back.
The Web Request action has two XPath expressions it will use. The one for Display and the one for ID.
Take your XML to some online XPath generator and that might help you build out the XPath you need.
Hi Vadim Tabakman,
Thanks for your response. Finally, I was able to figure out Xpath expression.
Now, i am facing a strange issue, service request is working fine in 'Run Now' mode for the first time. If i close it, and re-open again and say 'Test Request', it's throwing "The remote server returned an error: (500) Internal Server Error."
First time :
Closed it and preview the form, no results in drop-down. Back to edit mode of the 'Web Request - Control', selected 'Run Now' mode to see what's wrong, selected 'Test Request' and this is what I see,
I have compared both 'Request Body', but didn't find any difference.
This is what I tried,
Copy the request body shown in second pic, clear 'Request body' container and paste it back again, it's working again.
If I close this and test in preview mode, no result.
Is there something wrong, in my way ? Appreciate your help !
That sounds like really odd behavior.
1. check you are running the latest version of NF.
2. If you are, reach out to support because that should not behave like that.
Our current NF version is 220.127.116.11, we are in the process of updating it to the latest version, if the behavior still exist, will reach out to Nintex Support.
Coming to my second point of question,
You can add a reference to a textbox (the control has to have a Name populated in the settings of the control) in the web service url (add a reference and select the name of the textbox in the Named Controls tab). This way the web request will be executed each time the textbox is edited (focus out). It can help you if you can add a parameter in the url of your web request to filter on the employee id.
Tell me if this can solve both scenarios you mentioned.
Hi Caroline Jung,
My apologies for the delay. If you go through my above comments, I have an issue with " Nintex Forms - Web Request " control, so we upgraded our version and contacted Nintex Support to resolve this.
So, I didn't got a chance to try your scenario, but after the forms are working. I just followed your instructions and it worked like a charm !!
This is what I did for the cascading drop-down,
That's it, save and publish, the drop-downs are auto-populated as expected. Initially, I was in dilemma about this scenario, because DD 2 is in repeating section. But, with no extra configuration, all the drop-downs in each row of repeating section are loading with values, on value change in DD 1.
Hi Vadim Tabakman,
We just followed your suggestions to get this issue resolved,
Posting all the scenarios we tried, these might help someone else in the community.
Thanks again for your recommendations.
Hi Caroline Jung,
I have one another scenario, which I want to discuss,
We have around 3000 records of employees in the back-end, all these need to loaded in the drop-down of NF using web request, but business need some sort of text box on the drop-down to search for the employee, instead of scrolling through 3000 records of drop-down.
Once employee is selected, his ID and Designation need to be auto-populated in the text-box or labels next to drop-down.
I was able to load all the employees in the web request - drop-down but stuck at search box, even I had a look at 'Multi-select' format of web request control, but this wont suit my requirement.
This is not a new one, they changed the below previous scenario to above mentioned one,
Can we utilize web request control - similar to autocomplete drop-down, please assist ? I am not sure whether this need to be created as a new question, if yes, please assist, I will do so.