LookupUser
The LookupUser activity takes the UserName from formInstance.UserName and returns the Student Id or Staff Id in the UserId property.
-
If a UserType value of 'Staff' is passed in the activity, a Staff Id is returned.
-
If a blank UserType (default) is passed, a Student Id is returned.
The ability to retrieve the Staff Id exists in Forms Builder 3.5 or later.
The UserId is used by the GetEntity<> activity for the StudentEntity or StaffEntity to prepopulate forms where StudentEntity or StaffEntity fields are used.
Note: Optionally, you can add an If activity to the workflow to check for a valid Staff Id. For example, specify the condition "staffid=0" and add a CreateValidationItem activity to the Then branch with a message like "This staff user was not found."
Properties
Property | Value | Required | Notes |
---|---|---|---|
DisplayName | String
|
No | Specify a name for the activity or accept the default. |
UserId | OutArgument<Int32>
|
Yes | Specify the UserId using a VB expression or variable. |
UserName | InArgument<String>
|
Yes | Specify the UserName using a VB expression or variable. Note: The property |
UserType | InArgument<UserType>
|
No | Specify the UserType using a VB expression or variable. The namespace Cmc.Nexus.FormsBuilder.Entities.UserType provides the option to select 'Staff' or 'Student' as the UserType. When the UserType property is left blank, the default UserType is Student to ensure backward compatibility. If a staff sequence is accessed via cloud services (Azure), you must include a LookupUser activity with UserType=Staff in the workflow to ensure proper authentication and authorization for the Staff role. For more information, see Azure AD Authentication. |
ValidationMessages | InOutArgument
|
No | Specify a variable that can be used to capture validation messages. |