- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2020 01:51 PM
I'm trying to get the value of a variable I created on a record producer to carry on it's value to a field of the request it creates when I submit the record producer form. It's the "requested for" field, I created a new one for this record producer because I need it to have different properties than the "requested for" field on other catalog items. I was thinking of creating a client script for this but I'm not exactly sure how record producers set values for requests.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2020 01:55 PM
In the script section you need to use
current.{{field name on targetted tabl}} = producer.{{field name on record producer}}
For example : if caller id in incident needs to be updated from requested_for field on record producer then
current.caller_id = producer.requested_for
Please mark my answer correct/helpful if it helped you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2020 01:55 PM
In the script section you need to use
current.{{field name on targetted tabl}} = producer.{{field name on record producer}}
For example : if caller id in incident needs to be updated from requested_for field on record producer then
current.caller_id = producer.requested_for
Please mark my answer correct/helpful if it helped you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2020 02:03 PM
This didn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2020 02:10 PM
It worked, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2020 02:44 PM
And there's a much easier, no-code way of doing it now:
Click the "Map to field" checkbox and the "Field" dropdown appears allowing you to select the field on the table you want the data to go to. I'd do it this way and keep the script method for when you need to do some kind of data manipulation before applying it to the target field.
There is another way of doing as well - set the "Name" field to the same as the field name on the target table and it will be mapped automatically:
That method has been around forever. The "Map to field" checkbox just automates it for you. When the checkbox is "on", the "Name" field is hidden and populated with the field name for you. So it's not so much a new way of doing it, but a UI feature that sets the field name for you without any typos 🙂