HowTo:Load User Details
How-to: Load User Details
You may need to access User details in your flow. For example, you want to copy the user Login name to your data model to know which user performed some actions, or you want to access a User field to have different behavior based on user profile.
To achieve this, you can add the User entity to your DataSet and get it populated via a script. If your User maintenance module has additional entities (for example Group) you can also add these entities to the DataModel.
Add the User table to your dataset
- Create relevant Link so that the User entity can be added to your DataSet
- Add the User entity to the dataset
- Add the other entities linked to User entity as needed (for example Group entity)
- (Optional) In the DataSet mark the User entity and linked entities (e.g. Group) as "Read only" to prevent any modifications
Create a "LoadUser" script to load the logged on user details
- Script content
// "AliasName" is the alias of the User table in the dataset setLoggedUser("AliasName")
Add the "LoadUser" script where needed
The script would typically be added after a "New" action, or after a Lookup.