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

Web request control with combobox XPath values get switched?

In my organisation, we are using Nintex Enterprise. I have been asked to review a form using web request controls.

 

The problem has been reported that the XPath for value (//ClientNumber) that has been saved to the list, does not match the XPath for display (//FullName) that has been selected in the control. For example in the database we have:

 

Client number - Full name

12345 - Bill Gates

56789 - Anton Gates

 

So, when in the control the name Bill Gates is selected, the corresponding client number that gets saved to the list might be 56789. It seems from one item the name has been saved to the list and from the item below/above that, the number has been saved. This has happened very incidentally. I thought of multithreading but it seems too coincidental that when this happens the last name is (partially) the same.

 

We can't find any fault in the service url or the database (view) itself.

 

I think the problem might have to do with a JavaScript function that is active on the form and that I have very little experience with. The client-id of the web request control is saved to a JS variable (ClientNumber1). Example of the Javascript:

 

if(ClientNumber1.indexOf("_hid") > 0){
ClientNumber1= ClientNumber1.substring(0,ClientNumber1.indexOf("_hid"));
}
$('#'+ClientNumber1).combobox();

 

With this combobox users can search clients on (part) of a name. 

 

It is also worthwhile to mention there are 3 client lookup web request controls on this form.

 

Could this setup somehow switch out the index or something?

 

Any ideas would be much appreciated!

Labels: (1)
0 Kudos
Reply
2 Replies
Highlighted
Automation Master
Automation Master

Re: Web request control with combobox XPath values get switched?

Without seeing the code for what's happening with your Combobox widget or some more info about the form that's being used to make the selections, it will be impossible to tell / figure out if it's a JavaScript problem. 

 

The only issue I see with your code below is that:

(ClientNumber1.indexOf("_hid") > 0)

should technically be:

(ClientNumber1.indexOf("_hid") > -1)

 

But making that change will not change the results of what your code is producing. 

 

Could you tell us more about the form / javascript used to make the selections (using the List Lookups) and include a few images if possible? 

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Web request control with combobox XPath values get switched?

Thanks for your reply! This took us a while to figure out, but it turned out there was a problem with the database after all.

 

With regards to your suggestion, I'll have the developers look at the code. I am actually hoping we can rebuild the form in some way that we can do without the combobox. However that might not be possible since we do want to make the web request results (800+) searchable in the list choice control. By default you can search on the first character of a string. By presenting the Full Name this means people can only search on the first name and not the last. Do you have any other suggestions for me?

 

Regards, 

Yvette

0 Kudos
Reply