cancel
Showing results for 
Search instead for 
Did you mean: 
nchamid
Nintex Newbie

Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

Hi,

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 URLhttps://domain.com/axis/services/

SoapEnv:Request :

                      

SoapEnv:Response :

                 

   

   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.

Labels: (2)
0 Kudos
Reply
15 Replies
Nintex Employee
Nintex Employee

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump 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.

Vadim

Reply
nchamid
Nintex Newbie

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

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 !

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

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.

Vadim

Reply
nchamid
Nintex Newbie

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

Hi, 

Our current NF version is 2.9.3.0, 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, 

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.

Below are my scenarios, 

  • I have a text-box for user to input emp id,
    • am not sure, whether we can load all employees starting with that ID in a drop-down, while user typing ID, from back end. (Similar to 'SharePoint people picker' control).
    • If not, I am planning to display a button next to text-box named 'Search'. Once user clicks it, 2nd text-box need to be populated with employee name.

      e.g. :  Text-box 1 : 765454 (btnSearch)
                Text-box 2 : employee name [auto-fill on btnSearch click event]
  • Cascading DD,
    • upon selecting value in one DD, second DD need to be auto populated, these values need to loaded from back end.

This web request control allows itself to be populated, but i need a way to accomplish top mentioned scenarios.

Is this possible, please assist ?

Vadim Tabakman‌ Caroline Jung

0 Kudos
Reply
Automation Master
Automation Master

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

Hi,

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.

Reply
nchamid
Nintex Newbie

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

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,

  • Created a calculated field, since on DD 1 change, I am taking sub-string of the option selected.
  • In DD 2 (Web Request control), referred this calculated field value in request body, since I am not sending parameters in the URL.

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.

0 Kudos
Reply
Automation Master
Automation Master

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

I'm glad that Vadim and myself could help.

Thanks for your feedback

Reply
nchamid
Nintex Newbie

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

Hi Vadim Tabakman‌,

We just followed your suggestions to get this issue resolved,

  • Upgraded our NF version to latest 2.9.4.0, but no luck
  • Contacted Nintex Tech support,
    • Nintex tech person, looked at the issue and tried all the alternate ways to see what's wrong
      • Alternate ways :
        1. Copied XML (from Request Body) and pasted it in notepad (not notepad++) applied word wrap, later pasted it back to Request Body, but No Luck.
        2. Created a new list column (ML - Plain Text) in the list, and pasted this XML in it and tried to refer it in Request Body from named controls, but No Luck.
        3. Created two new controls on NF, label and calculated value, and pasted this XML and referred those in Request Body from named controls, but No Luck.
        4. Created a new WF, and utilized 'WF Action - Web Service', for testing, it worked here. So, copied XML from WF back to 'Request Body' of NF, still No Luck in forms.
    • After an hour, we navigated to an XMLFormatter online, and pasted our XML there and formatted it, took the formatted XML and pasted it in a Notepad and from there pasted back to NF Request Body, then we took a long breathe.Finally, it worked both in 'Run Now' mode and 'Execute Mode' after this. Even the Nintex tech person was saying, Notepad should take care of formatting, but it didn't.

Posting all the scenarios we tried, these might help someone else in the community.

Thanks again for your recommendations. 

Reply
nchamid
Nintex Newbie

Re: Make POST - Web Request on dropdown change event in Nintex Forms

Jump to solution

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,

I have a text-box for user to input emp id,

  • am not sure, whether we can load all employees starting with that ID in a drop-down, while user typing ID, from back end. (Similar to 'SharePoint people picker' control).

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.


Thanks.

0 Kudos
Reply