How do you pass record producer values to the record it creates?

simran3
Tera Contributor

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.

1 ACCEPTED SOLUTION

rajneeshbaranwa
Giga Guru

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

View solution in original post

4 REPLIES 4

rajneeshbaranwa
Giga Guru

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

This didn't work

It worked, thanks!

Jim Coyne
Kilo Patron

And there's a much easier, no-code way of doing it now:

find_real_file.png

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:

find_real_file.png

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 🙂