Assignment Group in workflow based on User profile selection of "location"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 12:04 PM
Hello,
I've come across a scenario where I need the assignment group to be based on what the user has populated based on the User profile. trying to script in the "Create Task" at the bottom.
example: if user has Volume1 selected in User profile, please assign to Volume 1 Group. If user has Volume2 selected in User Profile, please assign to Volume2 Group.
I can set the assignment group within the task but for this scenario i need to script to differ based on user profile.
any suggestions or feedback is appreciated or help docs i can refer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 12:20 PM - edited 07-20-2023 12:23 PM
So if a user has "Volume 1 Group" in a reference field (to sys_user_group table) on their user profile, then you should be able to dot walk to that information in the task script.
Something like (using user_profile_group as an example of the group field on the user profile):
task.assignment_group = current.requester.user_profile_group
or
task.assignment_group = current.opened_by.user_profile_group
This is how you would do it on a Catalog Task in a Workflow. That field on the profile just needs to be a reference field and the group needs to be a group on the sys_user_group table, so that when you try to populate the Assignment Group field, it's available and selectable. The script line above would grab the sys_id of the group on their profile and populate it in the assignment group field.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 12:50 PM
Hi there,
Can you describe in more detail what kind of Task you want to create?
If this is Catalog Task. You can create a custom table based on Assignment Rules.
After that create a Data Lookup Definition. It's easy to maintain than scripting.
You can follow this article for more details: Link
Please mark this response as correct and/or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 09:06 PM
Hello, im trying to send a request to a certain group based on the a "variable" from their user profile, if 2 people have different variables than eachother, one will have a different assignment group than the other,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 09:43 PM
Hi @HenryD ,
Seems like you have a list choice field on the user form, in which choices are like volume1, volume2 etc.
Now according to the task creator, you have to select the assignment group.
Correct me if I am wrong!
You can use a onLoad client script for the same, which will fetch the list choice on the user table by dot walking as shown by @Steven Parker , after that you just need to map the assignment group and set the value accordingly.
Let me know if you are seeking for the script or post the script if you need any help!
Thanks and Regards,
Rahul