Set Values and Run Scripts node of workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 01:35 PM
Hi
I need to set the assignment group of a catalog task with the value of a variable from catalog item.
My first question is related to set values node of workflow. Is it possible to access the catalog variables using the set values node and make this assignment.
My second question is around Run Scripts node. Can someone show a sample run script that I can use to set the assignment group of the catalog task with the catalog variable (say managed_by_group)
Appreciate any pointers. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2024 12:58 AM
Hello @Saquib Mohammed ,
1. We are able to directly set the values of any variables of catalog item present in the RITM or any fields value of RITM and also inherited by RITM(by using "Show related fields") but as per your requirement we need to map the fields values. so, it is not possible using "Set value" action of the workflow.
2. We are able to use script logic in the "Run Scripts" action of the workflow by using glide record or accessing values using dot walk and then mapping. If the run script is required then let me know. I will also help you in that.
3. But if you are creating the same task from the workflow which assignment group needs to set then you can directly use the script logic in the "Catalog task" action of the workflow.
Please use below code in the "advanced script" section of catalog script activity:
// Note: variable of catalog item (managed_by_group) need to present/visible on the RITMand sc_task tables.
Check the values by adding logs . If the below is not working then let me know i will update it as per your suggestions.
If my answer helped you in any way, please then mark it as helpful and acceptable.
Thank You in advance!!
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2024 07:54 AM
Thank you for the information. Adding the catalog script in the Create Task node didn't work. The catalog task is not even getting created now. Removing the catalog script generates the catalog task but does not set the assignment group, which is understandable. But adding the script doesn't let the sc_task to get generated at all.
Note that this workflow is at the request level - not at the requested item level. current.variables should still be accessible at the request level- correct?