Skip to main content

Hi,

I have a form with sevearl fields and a panel that I hide if the user is not part of a group (Buying Department). In that panel I have a text field, a choice field and a lookup field.

When I create a new item and I'm not in the Buying department, as expected I don't see the fields in the panel, I can fill in the other fields on the form and save it.

If I'm in the Buying Department, I can edit the form, fill in the fields inside the panel and save. All the data is saved as expected.

 

Now if a user not in the Buying Department goes back to edit that form and save it, the data in the text and choice field of my panel are preserved, but the lookup field is not and ends up being empty.

 

Why is that? How can I ensure that the data in the lookup field is not lost?

Hi Valerie,

Are you sure that the user not in the Buying Department has access to the lookup list?

Regards,

Christophe


Hi Christophe,

Yes they do have access. And if I unhide the panel so that all users can see the fields inside it, they can successfully update the lookup value.


Valerie,

Can you check, in Edit mode, if your lookup column is in your HTML source and with which value when the user not in the Buying Department

Same for the text field.

Regards,

Christophe


Christophe,

I checked the HTML in the Edit form and the fields are not there, which I assume would be normal as I only show the panel when the user is in the Buying Dept group. The panel visibility is set by setting the visibility of the panel to the expression fn-IsMemberOfGroup(Buying Department).


Valerie,

I have made a simple test by just hiding a lookup field and the value stayed.

Which type of column do you lookup?

Can you share a screen shot of the Control setting of your lookup control?

Christophe


Christophe, thanks for taking the time to assit on this.

I have a custom list (Suppliers) with just the Title field. Then I have a custom list (Orders) with the lookup field to the Title in the Suppliers list. 

Then in my Nintex form for the Orders list I have a panel:

And inside the panle I have my Supplier field (and other text fields) :

As mentioned before, I have a single line of text and choice fields in the same panel and those are not losing their values.


Good news: I have reproduced the issue ;-)

Even more good news, I have found a work around :-)

Remove the hidden expression from the Panel Control setting

Add a Rule to hide the panel

I did not use the same formula but it should work the same I guess

Good luck,

Christophe


Thanks Christophe. The reason I didn't use a rule but used the panel settings is because there is not built-in function in Rules to check if a user is a member of a group, like there is in the panel settings. But it looks like I'll need to find a workaround using Rules.

Thanks for pointing me in the right direction :-)


Maybe you will need to use Javascript and in this case I recommand this blog post

Hide Edit Item button if user is not allowed to edit using


Ok I have found a solution without having to use javascript.

I have added a Calculated Value control to my form (I hide it using custom css). I have set name to IsBuyingDept and the formula to fn-IsMemberOfGroup(Buying Department). Note that you can't use a reference to add this formula, you have to type it in, but it works and will set the value to true if the user is a member of the Buying Department group, and false if he is not.

Then I've added the following rule to my panel to hide it if the user is not a member of the buying department:

And now the value in the supplier drop down (that is inside the panel so hidden to non members) is preserved if a non member saves the form.

A bit of a long way round but it works :-)


Reply