Views:

Behavior:
I have a global variable created that is the data type, "User of a Group" and is a list variable. When I try to populate this variable during the process with users or roles, nothing is ever entered into my workflow.

Solution: 
With global variables that are "User of a Group" or "Role," in order for a value to be placed, that user/role being entered must be in the DocuWare system. If the User/Role does not currently exist, then it will not show up in the global variable. Additionally, if the value contains a space, then this will also cause the value not to be entered. To resolve this, you would need to remove the space from the User/Role.

If you suspect that a space is in the value, try the following recommendation,

1. Have a User List Global Variable created. (Make sure that you check the box for "List Variable")

2. In the Assign Data step, use the following arithmetic expressions to check the left and right side of the value for spaces we need to remove;

  • Checking Left Side: IIF(Left(GV_Variable, 1) = " ", LTRIM(GV_Variable), GV_Variable)
  • Checking Right Side: IIF(Right(GV_Variable, 1) = " ", RTRIM(GV_Variable), GV_Variable)

The following is a quick example to illustrate its implementation.




In the screenshot above, we have a Text Global Variable named EnteredUser, containing a user we would like to assign to a User of a Group variable. For testing purposes, we added some spaces in front and back of the value.
We also have a text global variable named UserFix using the following arithmetic expression, 
IIF(Left(GV_EnteredUser, 1) = " ", LTRIM(GV_EnteredUser), GV_EnteredUser)
This will check the left side of the value for spaces. If found, we will Trim the left side of these spaces. Otherwise, if none are found, we will return the original value.



Like the last step, we will now check the right side of the value for any spaces using the following arithmetic expression,
IIF(Right(GV_UserFix, 1) = " ", RTRIM(GV_UserFix), GV_UserFix)
This time, we will reference the UserFix global variable instead of the original global variable EnteredUser.
If no spaces are found, it will return the original value. 




At this point, the value will contain no spaces in front or back, and this method will also ensure that usernames with spaces in the middle are not affected. 

KBA is applicable for both Cloud and On-premise Organizations.

Comments (0)