- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2025 08:34 AM
Hello guys!
I'm trying to map a reference variable called 'pr_number' (based on alm_asset) to a sc_req_item field called 'configuration_item' in Back-end.
I have a workflow connected to my catalog item with this reference variable called pr_number.
This is the script I use:
else if (current.variables.pr_number) { current.configuration_item = current.variables.pr_number.cmdb_ci; // Map pr_number to configuration_item }
The problem is that it is always empty. Is there anything I've missed? It should be possible to dot-walk right?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2025 09:16 AM - edited 01-14-2025 09:17 AM
The field on the alm_asset table labeled Configuration Item for some reason is named 'ci', so this part of your script would be
else if (current.variables.pr_number) { current.configuration_item = current.variables.pr_number.ci; // Map pr_number to configuration_item }
Also, for some reason there are two fields labeled 'Configuration item' on the sc_req_item table, one named 'cmdb_ci' and the other named 'configuration_item' so ensure you are setting the correct one in your script for your environment based on the field that is shown on the form...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2025 09:16 AM - edited 01-14-2025 09:17 AM
The field on the alm_asset table labeled Configuration Item for some reason is named 'ci', so this part of your script would be
else if (current.variables.pr_number) { current.configuration_item = current.variables.pr_number.ci; // Map pr_number to configuration_item }
Also, for some reason there are two fields labeled 'Configuration item' on the sc_req_item table, one named 'cmdb_ci' and the other named 'configuration_item' so ensure you are setting the correct one in your script for your environment based on the field that is shown on the form...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2025 02:14 PM
You are amazing!