xpath question for user roles

0
in this xpath, i am looking to set a user role for a user.   [id = '[%UserRole_Strategy%]']   before it can come to the retrieve option, i am able to get the current users user-role based on a pre-defined mapping. so user1 has Strategy as a user-role based on the mapping. now i want to set this user role to the user.  Note that there will be multiple users with different user roles, so i want this field to be dynamic, based on user login. i want to understand how can i change the “Strategy” value with a variable that can put the right value into this field just after %UserRole_<variable>’ just to update i am able to get it in a variable just before this step, but not able to add it as a variable… need suggestion..
asked
1 answers
0

The core of your question seems to be:

“i want to understand how can i change the “Strategy” value with a variable that can put the right value into this field just after %UserRole_<variable>’”

 

My approach here would be to simply create a microflow that will check the incoming variable and retrieve the corresponding user role (based on a series of yes/no decisions  to check a string or on an enumeration representing the desired user role). 

 

 

After retrieving you would simply set the user role by updating the ‘System.UserRoles’ association of your user (check if you need ‘Set’ or ‘Add’)

answered