How to assign multiple variables to a description field on a Record Producer

Ben Edwards2
Tera Contributor

I have set up various record producers which need to have a short description of the record populated with multiple variables from the record producer. 

 

I have the following script in the record producer: 

current.description = "Requested for: " + current.requested_for + "\n" +
                                     " Desk Chair type: " + " Standard " + "\n" +
                                     " Reason for request: " + current.reason_for_request;

 

Two questions: 

1. current.requested_for, is returning a sysID to the description field (It is a Requested For field).

 

2. current.reason_for_request is returning undefined. (It is a select box)

 

Thanks for any help.

1 ACCEPTED SOLUTION

Sai Kumar B
Mega Sage
Mega Sage

@Ben Edwards2 

Try the following code

To access Record producer variables use producer.variable_name

 

current.description = "Requested for: " + current.getDisplayValue('requested_for') + "\n" +
                                     " Desk Chair type: " + " Standard " + "\n" +
                                     " Reason for request: " + producer.reason_for_request;

 

View solution in original post

3 REPLIES 3

Sai Kumar B
Mega Sage
Mega Sage

@Ben Edwards2 

Try the following code

To access Record producer variables use producer.variable_name

 

current.description = "Requested for: " + current.getDisplayValue('requested_for') + "\n" +
                                     " Desk Chair type: " + " Standard " + "\n" +
                                     " Reason for request: " + producer.reason_for_request;

 

Worked Perfectly. Thank you Sai! 🙂

Ben Edwards2
Tera Contributor

I dot walked to current.requested_for.user_name. Which resolved the sysID issue.