Is there a way to hide an embedded view on a form based on the role of a user?
Subject: Hide an Embedded View based on a User Role
Just use the hide-when formula on the embedded view properties:
@If(@IsMember(“[rolename]”; @UserRoles); @False; @True)
Subject: Hide an Embedded View based on a User Role
Yes, Click on the embedded view, then in the programmers pane click Formula, then write something like this:
@If(@IsMember(“[YOUR ROLE HERE]”; @UserRoles); “View Name Here”; “”);
This would only show the view if the user has the role.
Subject: RE: Hide an Embedded View based on a User Role
Thank you both very much for your help! Is there anyway to hide the gray box when the view is being hidden?
Subject: RE: Hide an Embedded View based on a User Role
Kelli - if you don’t use the “Embed view based on formula” but instead specify the view, but put my formula into the HIDE-WHEN tab of the embedded view properties, the whole embedded element will get hidden
Subject: RE: Hide an Embedded View based on a User Role
Thank you!
One more stupid question.
I tried both ways. Putting the formula in the programmers pane and then in the Hide - When tab of the properties. The formula only works the first time I test it (ie. Hides the embeded view), then when I go out and test it again the view is visible whether I have the User Role or not. Am I missing something?