Record Producer Script to put values into notes field

Elizabeth26
Tera Contributor

I have a record producer that goes into a table.

I want some of the fields from the record producer to put what's in those values into the notes field.

I want the fields to put into one entry in the notes journaling field. 

How can I write a script in the record producer to do this?

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

I believe this is a pretty common ask from the community so you may have more success searching the forums.

Outside of that, in the record producer script (that field on the record producer settings page).

You can use example like:

current.work_notes = producer.variables.field_1 + '\n' + producer.variable.field2;

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

8 REPLIES 8

SusanWinKY
Kilo Sage

You could try something like this to update the comments or work notes, with the field values separated by a comma...

current.comments = producer.yourfieldname + ", " + producer.yourfieldname2;

current.work_notes = producer.yourfieldname + ", " + producer.yourfieldname2;

 


Susan Williams, Lexmark

Allen Andreas
Administrator
Administrator

Hi,

I believe this is a pretty common ask from the community so you may have more success searching the forums.

Outside of that, in the record producer script (that field on the record producer settings page).

You can use example like:

current.work_notes = producer.variables.field_1 + '\n' + producer.variable.field2;

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

That worked but how can I add the field name so it shows me the question and then the answer the person selected? All I see is the answer.

Hi,

You'd want to use getLabel(), such as:

current.work_notes = producer.field_name.getLabel() + ': ' + producer.field_name + '\n' +  producer.field_name2.getLabel() + ': ' + producer.field_name2;

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!