Skip to main content

I want to build just one EDIT form where the only difference is if I'm a user that belongs to group A then I want certain controls exposed. How can we do this in K2?

Can you get that group from AD to be displayed on a hidden field somewhere on the column? 

If yes, then you can write a rule - when the form is initializing , if the group value is xyz then display the control else hide it. 


Dear ,

 

I Assume that u r using K2 groups or sharepoint groups ,

either way , what i suggest is that u store the "Name" of ur members into a SQL Table , with another field which is the Group Id ,

I use the "name" because its unique and couldnt be duplicated ,

so anywho , on "when form is initializing" u add "smart object get list method" and filter it by MemberName from (System values->Current username"Name")

and return back the Group Id into a hidden datalabel on the form ,

After that rule u will need to add "Advanced Condition" Or u could add the rule on "when a control executes a method" which is the datalabel when its changed

 

U Add :

"Advanced condition"

If (datalabel = Group A)

Show/hide wt u need Or Enable/disable

(If datalabel = Group B)

Show/Hide wt u need Enable/disable

 

Hope it helps ,

Best regards.


Reply