Restrict drop down options based off of current user?


Badge +2

Simple form with a list lookup used for the options of a drop down that shows categories. 

I have been asked to add an additional category that needs to be hidden unless users are in a specific AD group. 

Is this possible? 

Here are my thoughts so far:

User A (in the special AD group) - Sees 10 category options

User B (not in the specail AD group) - Sees 9 category options

Have two lookup lists (for categories) one with 10 and one with 9 and then validate the user to determine which lookup to use? 

Any help or recommendations will be greatly appreciated. 


7 replies

Userlevel 5
Badge +14

does it have to be AD group? it might be quite complicated to check AD group membership in forms.

it would be much easier with sharepoint group

considering SP group, basically you have two options

- either filter conditionally with 'Source view', like

fn-If(fn-IsMemberOfGroup('SpecialSPGroup'),'All Items','Limited Items')

203549_pastedImage_1.png

- or filter conditionally by dedicated list fields which would denote items to show

fn-If(fn-IsMemberOfGroup('SpecialSPGroup'),'ItemsForSpecialGroup','ItemsForAllUsers')

203550_pastedImage_2.png

Userlevel 6
Badge +16

You can use the Inline function named fn-IsMemberOfGroup(groupname) and show differents controls(lookups) based on a rule.

Here you have a sample >>> http://nintexdownload.com/Nsupport/NF2010_Tutorial_How_to_show_hide_controls.pdf 

Userlevel 4
Badge +11

Hi,

An other option you can look at, because the list of categories is small and you have a small number of items with a different visibility, is:

- in the category list, change permission for the special category and remove default groups and let it visible only for the special group (remember to keep also some administrator with full control, in case you need to change something for that item).

In this way, if a user isn't in the special group, when he open the dropdown tied to the lookup field, he can see only the items he can read.

As I've said at the beginning, this is an approach I suggest if there are only few special items, and this avoid to built some special rules in the Nintex Lookup Control filter parameter..in more complex scenario, Marian or Fernando approach is probably the best.

Giacomo

Badge +2

Getting a strange error when applying this in the source view.

Please address the following:
  • View with name "fn-If(fn-IsMemberOfGroup('Operations Members'),'All Items','Special')" does not exist in List 31f4ff9b-3ef9-44c8-a2c9-4201710b1e05.

I can simply type in "Special" or "All Items" in the source view and it will only show the correct view in the drop down once published.

When I try to add the "IsMemberOfGroup" or "IsCurrentUser" I get the view error seen above.

Any ideas?

Userlevel 5
Badge +14

what forms version are you on?

this should have been addressed with 2.9.3.0

  •    List Lookup control can now utilise functions in the Source View option (93384)
Badge +2

We're on 2.9.0.0 so I'll have to update our forms. Hopefully that will resolve this issue. Thanks!

Badge +16

I would say have item level permissions on your lookup list - the tenth option only being accessible to the specified ad group? 

Reply