- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 07:05 AM
I am having a brain cramp here. I have a variable in a Script Includes that runs against a Catalog Item that looks like this:
var st = current.variables.desired_state;
The desired_state variable on my Catalog Item is just a reference field on the sys_choice table. So, that line of code above returns the sys_id of the record selected. However, I do not want the sys_id of that record. Rather, I want the value from the "value" field of that sys_choice record. How do I return that in a variable in my Script Includes?
Thanks
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 07:13 AM
Hi,
you should be able to grab that value by using current.variables.desired_state.value as it is a reference field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 07:13 AM
Hi,
you should be able to grab that value by using current.variables.desired_state.value as it is a reference field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 07:33 AM
I was totally overthinking this! I don't know why I was trying to make this harder than it is.
Thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 08:01 AM
Happens. No worries.
Please mark the solution correct if that helped.