vmanning
Novice

Lookup field data not saved in hidden panel - o365

Jump to solution

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?

Reply
10 Replies
christopheraucq
Apprentice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

Hi Valerie,

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

Regards,

Christophe

0 Kudos
Reply
vmanning
Novice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

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.

0 Kudos
Reply
christopheraucq
Apprentice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

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

0 Kudos
Reply
vmanning
Novice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

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).

0 Kudos
Reply
christopheraucq
Apprentice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

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

0 Kudos
Reply
vmanning
Novice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

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.

0 Kudos
Reply
christopheraucq
Apprentice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

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

0 Kudos
Reply
vmanning
Novice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

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 :-)

0 Kudos
Reply
christopheraucq
Apprentice

Re: Lookup field data not saved in hidden panel - o365

Jump to solution

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

Reply