Sql query field doesn't keep the saved data in edit mode


Badge +9

Hi,

I've a form that has a sql query that brings data on the form. Once the user selects from the drop down menu, it saves it correctly. The information (on that field) can be viewed in the view mode. but if try to edit the form, the value on the sql query field is not selected. Below are screenshots of the configuration, an example of the values selected, links to the list fields and then the same form in view mode and edit mode. It's causing data entry delay as everytime they edit the form, they will have to reselect the vendor over and over. any ideas why this is happening?

The field configuration: 

 

This shows the values for fields vendor ID and Vendor ID2, VendorID2 is the one that is supposed to be displayed on the form in view/edit mode. 

This is the form in View mode, which does show the VendorID2 field, with now issues.

Once the user tries to edit the form, the selected value from the drop down list is not there, and it is a required field, so they will have to reselect everytime. 

Do I need to mark the "execute in edit mode" == No? Isn't this field is to get the list of vendors from the database and make them available for selection but shouldn't not flush the existing data? 


12 replies

Badge +9

I was curious to see what if I choose to "execute in edit mode" to be == No, would do..

And here it is, it still doesn't select the value by default, but when I click on the drop down menu it shows the option for only the vendor that was selected before.

Userlevel 6
Badge +13

I'm encountering this same issue. I've got a SQL Request Control rendered as a multi select check box list. It's a stored procedure that uses a text box control on the form to effectively perform a free text search on the SQL table. When users select items, via a calculated value these items are stored in multi line text field so I can manipulate them a little. The raw data is saved into another field. When I reopen the form in view mode the selected items are there, but then in edit mode they are not selected and if you resubmit them then the original values are overwritten which is no good to us.

Badge +1

I don't believe the SQL Request Control used to work this way.  I have been using the SQL Request Control with the List (Multiple-Selection) display format and it used to retain the selected values entered in the New form even when  "Execute in Edit" is set to Yes.  I recently upgraded to 4.2.2.0 and noticed this issue.  I have submitted a support request and will update this thread when I hear back from Nintex.

Userlevel 6
Badge +13

I've had a response to my ticket with Nintex saying that it's been resolved in Nintex 2013.

Unfortunately I am running 2016 so can't test but would be interested to here if it's sorted.

Also, does it now retain values if executed more than once. So I have a cascading dropdown/selection controls where a user may make a selection from the second multi select control, then update their selection in the first dropdown and make more selections in the multi-select.

My theory is that it won't retain values as the query has been executed with different values therefore it cannot retain values that were selected if they aren't returned in the next query.

Badge +1

We have upgraded to version 4.3.1.1 and this issue seems to have been resolved.  The SQL Request Control displays the saved data as expected in Edit mode.

Userlevel 6
Badge +13

Can confirm the same for 2016

Badge +9

I'm running on SharePoint 2010. If I upgrade will this be fixed? or is it only on 2013 and 2016? 

Badge +9

to Answer myself happy.png I think it would,   version 1.12.2.12 I just need to give it an upgrade and see. I'll update this post if the upgrade fixed it in 2010. 

Badge +9

hi Amy MacInnis‌ & Have you done anything special other than the upgrade to make it work? 

I just upgraded Nintex forms 2010 to version 1.12.2.20 and the sql selected value is still not selected when in edit mode!!

I republished the form, re-selected the value on one of the items and saved the form, reopened in edit mode and it is still not selected..

Any suggestions?

Badge +1

Hi ‌,

I actually didn't have to do anything to get the control to work as expected again.  All I did was upgrade the Nintex version to 4.3.1.1.  Perhaps contact Nintex Support?  Sorry I couldn't be of more assistance.

Badge +9

Thanks Amy for your response. I opened a ticket with support. I'm really hoping that the fix included 2010 as well and it would just be me doing something not quite right. 

Badge +9

Until a word is heard from Support. Here is what I did now as a quick workaround:

1. Created a single line of text to save the selected value from the Sql request control. 

2. Placed the two controls (the sql request and the single line of text) in the same spot.

3. Created some formatting rules to show and hide the controls based on the mode. 

4. Created a checkbox for the user to select to edit the column 

-- show the text field in display mode or edit mode. show the sql control only when the edit(y/n) checkbox is selected and the form is in edit mode... etc. 

5. also made the default "please select value" to be picking from the single line of text (VendorID2). if it is a new item, then it will show a blank value, but if it is an existing field, it will display the value coming from that single line of text.

212082_pastedImage_1.png

Reply