I have an expense reimbursement form that uses and SQL request to pull in department numbers in a drop down as one column in the repeating section. Each repeating section is an expense line item. When the user is completing the form, they need to select which department the expense on each line goes to. The SQL request pulls the department numbers from a SQL database so that we only have to manage that list in one place. When the user saves their form and later goes back to edit it, the department is automatically switched back to the first department in the drop down list. rather than the department that they had initially picked. Is there a way to make the users selection stick?
Changing execute in edit mode to no is not an option because the user will then not be able to add any additional lines if they edit.
Have you found a solution for that issue? I am facing the same behavior. Moreover, if you have SQL Request action within a repeating section you are unable to connect it to any field from a SharePoint list (I guess this is the reason - form looses context).
I recently starting messing around with pulling data into a form using this control and honestly... this seems like an incredibly silly oversight on Nintex's part.
I can't for the life of me fathom why this wouldn't behave like a Lookup Control, and digging deeper into it, found that it doesn't seem to be designed (or able) to retain the value selected beforehand. That means you can't even cheat and execute some clever code before the control is fully initialized on the Form. Gah!
Though I had to walk away from that particular part of the project, I will be returning to it soon and believe that a workaround can be created that uses the jquery.ui library (which is already included with Nintex Forms), and a secondary Single Line Text control that will have a Autocomplete w/ Dropdown widget applied to it (example: https://jqueryui.com/autocomplete/#combobox).
If anyone else can come up with some other solutions, I'd love to hear them.
Additionally you're interested in getting this fixed, I have created a suggestion that covers everything that seems to be an issue with the control atm (unless someone has one of those fancy suggestions I've mentioned). Please vote on it over at: https://nintex.uservoice.com/forums/229406-2-nintex-forms-for-sharepoint/suggestions/34943281-update...
(Edit: It would seem that the above suggestion was removed from the uservoice, and no longer exists... Not sure how that happened, but I'll have to make another later I guess.)
I'm not sure if this is what you want but...
I looked at doing it at the SQL level. I pass a parameter into the stored proc which is going to be my top result and then bring back the rest of the departments.
So as you can see from below I'm passing in Information Technology into the script and it puts it at the top.
The working form below. I've chosen a default of Dealing and Treasury and when I go to select the dropdown in the repeating section, the default appears a the top.
How it works. I have created 2 SQL lookup fields that connect to the script above. One sits outside and acts as the default choice.
The other sits in a repeating section. It looks to pass the default dept choice back to the Stored proc to bring the chosen dept to the top.
A calculated field looks at the default dropdown list and that is used as the parameter to pass back to the dropdown list control in the repeating section.
Hope that helps you.