You are viewing limited content. For full access, please sign in.

Question

Question

How to adjust a form's functionality based on the group the user is in?

asked on January 6, 2022

I have a simple submission form that can be launched by two different organizations.  Each set of users is organized into an LFDS group, which is given permission to start the form.  I need to be able to limit one organization to a single selection in a drop down (I can handle this), but how can I determine which group the user is in?

0 0

Answer

SELECTED ANSWER
replied on January 6, 2022 Show version history

Hi James-

I'm doing something similar in Forms, making some dynamic options available based on LFDS group membership. I created a simple view in LFDS that shows username and group name. Then the lookup in forms uses the built-in token of _(Current User) to look up the user account name.

Note that if you have users in multiple groups, you may need to tweak the view or use a stored procedure to limit things to just the 2 groups you care about.

CREATE VIEW [dbo].[vw_GroupMembership]
AS
SELECT        dbo.directory_objects.name AS GroupName, directory_objects_1.name AS UserName
FROM            dbo.group_membership LEFT OUTER JOIN
                         dbo.directory_objects AS directory_objects_1 ON dbo.group_membership.member_sid = directory_objects_1.sid LEFT OUTER JOIN
                         dbo.directory_objects ON dbo.group_membership.group_sid = dbo.directory_objects.sid
GO

 

 

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.