cancel
Showing results for 
Search instead for 
Did you mean: 
apalazon
Nintex Newbie

Set lookup source view dynamically

Jump to solution

Hi,

I have a lookup control inside a Nintex Form.

I want to use one source view or another depending on whether or not the current user belongs to a group.

So that some users will be able to chose some elements, and others won't.

I went to the lookup configuration, source view, and I set this formula: 

if(fn-IsMemberOfGroup("myGroup"),"View1","View2")

But it is not working, the lookup control gets the default view. I also tried to remove the double quotes from the view names but it didn't work.

Any idea?

Thanks in advance.

Reply
6 Replies
Automation Master
Automation Master

Re: Set lookup source view dinamically

Jump to solution

formula seems to be correct.

make sure both views exists on the list.

make sure configuration of these views and default view have different filtering conditions so that you can spot the difference.

0 Kudos
Reply
apalazon
Nintex Newbie

Re: Set lookup source view dinamically

Jump to solution

Hi Marian, I set a calculated field with the formula to check if the formula works, and it does.

However it doesn't work inside the lookup configuration.

Thanks.

0 Kudos
Reply
Automation Master
Automation Master

Re: Set lookup source view dinamically

Jump to solution

not sure what's exactly in your meaning 'dynamically' and what you expect from that.

but you can not fairly compare it to calc value control.

calc value control is evaluated at runtime and at every change of a object it depends on.

source view of lookup control (resp. all the formulas that depends on inline functions) is is evaluated just once at form load.

so in your case, it should give different views for different users, one being and second not being member of a group.

but it will not change the view on opened form if user's membership in the group changes.

Reply
apalazon
Nintex Newbie

Re: Set lookup source view dinamically

Jump to solution

Hi,

"source view of lookup control (resp. all the formulas that depends on inline functions) is is evaluated just once at form load.

so in your case, it should give different views for different users, one being and second not being member of a group."

That's exactly what I meant when I wrote "dynamically".

"but it will not change the view on opened form if user's membership in the group changes"

I don't need that.

Thanks.

0 Kudos
Reply
Automation Master
Automation Master

Re: Set lookup source view dynamically

Jump to solution

ok.

so to check how does your formula evaluates at form load, place a single line text control on form and sets it default value to the formula.

0 Kudos
Reply
apalazon
Nintex Newbie

Re: Set lookup source view dynamically

Jump to solution

Hi,

This is working now,  I have the international Nintex Version (spanish). So far I ve always used the formula fn-IsMemberOfGroup, which worked perfectly, but I ve just noticed that the lookup source view formula picker has a formula called EsMiembroDeGrupo, which seems to be the english  to spanish formula translation.

Thanks for your time.

Regards.

View solution in original post

Reply