apps
latest
false
- Getting Started
- Demo apps
- How To
- Access the production URL of an app
- Build a Mobile-Friendly App
- Use the current user group in an app
- Embed Maps
- Set External Context
- Use arrays to populate Dropdown, Multiselect dropdown, and Radio Button controls
- Use Count with Choice Set values
- Use DataTable with Table and Edit Grid controls
- Use Input Mask
- Notifications
- Using VB Expressions
- Designing your App
- Designing your App with Autopilot
- Events and Rules
- Rule: If-Then-Else
- Rule: Open a Page
- Rule: Open URL
- Rule: Close Pop-Over/Bottom Sheet
- Rule: Show Message
- Rule: Show/Hide Spinner
- Rule: Set Value
- Rule: Start Process
- Rule: Reset Values
- Rule: Upload File to Storage Bucket
- Rule: Download File From Storage Bucket
- Rule: Create Entity Record
- Rule: Update Entity Record
- Rule: Delete Entity Record
- Rule: Add to Queue
- Rule: Trigger workflow
- Rule: Submit Action
- Leveraging RPA in your App
- Leveraging Entities in Your App
- Leveraging Queues in Your App
- Leveraging Media in your app
- Leveraging Actions in your app
- Leveraging Connections in your apps
- Web apps in Studio Web
- Application Lifecycle Management (ALM)
- UiPath® First-Party Apps
- Basic Troubleshooting Guide
Use the current user group in an app
Apps User Guide
Last updated Jan 21, 2025
Use the current user group in an app
You can use events to display different content in your app based on whether or not the user is in a specified group. This example demonstrates showing different messages to the user based on whether or not they are in a particular group.
- Open an existing app, or create a new one.
- Add a Button control to your app, and associate a rule with it:
- Select Add control to your app, then Input.
- Select the Button and drag it to an area in your app.
- In the Properties panel, select Events.
- Under Clicked on, select Edit rule.
- Select Add a new rule.
- Configure the rule:
- Select If-Then-Else.
- Select the If field, and add the following expression:
CurrentUser.Groups.where(function(x)x.Contains("Group3")).Count >0
. - Under Then, select Show message.
- In the Type dropdown, select Success.
- Under Else, select Show message.
- In the Type dropdown, select Warning.
- Save your app.
When you run the app and select the button, the system displays a success message if the user is part of Group3. The system displays a warning message if the user is not part of the specified group.