- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2017 12:53 PM
Hello team!
I needo to insert a value (string) from a catalog Item variable to a specific field on the table sc_req_item:
target table: sc_req_item
target field: u_oficina_afectada
source variable name: Oficina_afectada
Variable Type: reference
Refers to: cmn_building.
Should it go as a calculated field? Is it a script running as part of the workflow??
Can you please indicate me the exact steps should I follow to make it work?
Thank you!!!
Regards,
Pablo
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2017 02:14 PM
Pablo,
You could achieve this with one of two methods:
- A 'before' business rule on sc_req_item. Note: you should consider adding a condition for the script to execute based on the specific catalog item(s) your variables are associated with. Basically, you don't want the business rule script to execute on every sc_req_item record because not all of them will have the same variables.
- A Run Script activity in whatever workflow is associated with that catalog item.
The fundamental components for the script would look similar to this:
current.u_oficina_afectada = current.variables.Oficina_afectada;
I hope this helps.
Cheers,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2017 02:14 PM
Pablo,
You could achieve this with one of two methods:
- A 'before' business rule on sc_req_item. Note: you should consider adding a condition for the script to execute based on the specific catalog item(s) your variables are associated with. Basically, you don't want the business rule script to execute on every sc_req_item record because not all of them will have the same variables.
- A Run Script activity in whatever workflow is associated with that catalog item.
The fundamental components for the script would look similar to this:
current.u_oficina_afectada = current.variables.Oficina_afectada;
I hope this helps.
Cheers,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2017 02:45 PM
Thanks Jeff!! That worked!!!
I just have to resolve how to bring a readable string cause now I ´m having a set of characters there. Guess that is a kind of field type configuration.
Regards,
Pablo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2017 07:58 PM
I'm glad it worked out for you!
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2017 03:48 PM