Solved

How to lock values of controls after form completed?

  • 16 January 2020
  • 6 replies
  • 201 views

Badge +8

on Nintex Forms for Office 365, new responsive designer.

 

After my users submit a new form, whenever another user opens the form to view the details, the controls change.  For instance, the form automatically calculates the Department by setting the Default value to userProfileLookup([Context].[Current user login name],"Department"), and the user selects and employee in a List Lookup control whose available selection options are determined by the user's Department.  When another user opens the form, it re-calculates the Department and clears away the selected employee.

 

Yes, I have already added rules that mark the control as Read-only when in Edit mode and Display Mode rather than New mode.  That did not prevent it from changing the values.

 

(oops, I forgot the word "not" in that previous sentence ... I added it now)

icon

Best answer by v-tmasenko 17 January 2020, 14:28

View original

6 replies

Userlevel 3
Badge +9
Instead of using Default value to populate Department, define a rule:
if Department Is Empty then
Department Value "is assigned" variable_userProfileLookup

Now the Department field will only be assigned a value from the userProfileLookup function when the Department field is empty!
Badge +8
Thanks. That works, for the Department. And it also reminded me that I should set up some of the rules to run only when form is in New mode. That helped resolve some other issues I was having.

It does not help with the List Lookup control, but I think what I can do is hide that List Lookup control when form is not in New mode, and I can display another similar list column that I have available.

That's a lot of rules. I am starting to get into double digits. Hopefully the form can handle it.
Badge +8
Nope, even when I hide the List Lookup control, and even mark it read-only, it still clears out the value that was selected when the form was first created. It clears it from the list itself, not only from the form.

Sigh. I may have to make the entire form inaccessible and instead create a read-only archive in another library.
Badge +8
My question is still only half-solved. I can now lock the value of the Department (text control) but I cannot lock the value of the List Lookup.

I need a way to either lock in the value of a List Lookup control (not the ID from list the list item but the actual value selected) or have it allow me set the value of the List Lookup using a rule or make it so that I can disable the Submit button so that no further edits can be done using the form.
Badge +8

Update - I was able to achieve a work-around for being able to lock all updates, including the List Lookup.  I added a dummy, read-only field to the form and set to as Required when Form Mode is not New.  This causes the user to be unable to save the form using the Submit button.  I also placed a label explaining that the user should use the Close button to prevent changes to the form.


 


I also save the EmployeeNumName selected value into another text field, and I display that value instead of the List Lookup.  This works well, except for that pesky extra “01234#;” text, but that’s okay.

Badge +4

If you use a variable you can lock down to only calculate when the form is in New Mode. Not sure if that works with your requirement though.

Reply