How can I add a variable to the end of a String field

John H1
Tera Guru

I have a request to add a variable to the end of our Short Description variable.

 

I'm looking for something like Short Description: I want to add additional software to my laptop - Joe Jones

Joe Jones is a variable called "Requested For"

 

This is what I'm playing with to no avail.

current.short_description = "I want to add additional software to my laptop - " + producer.requested_for;

1 ACCEPTED SOLUTION

Rupanjani
Giga Guru

Hi @John H1,

Try the below script and check

current.short_description = "I want to add additional software to my laptop - " + producer.requested_for.name;

 


Mark the response correct and helpful if the answer assisted your question.

View solution in original post

6 REPLIES 6

@John H1 If you using a record producer, then it needs to go into the record producer script.

Screenshot 2024-07-10 at 12.28.51 AM.png

Hi @John H1 ,

 

You can replace the line which you have been trying with.

 

Another way, you can write a before BR:

Table: sc_req_item (Assuming RITM) <where the change should appear>

Advanced: true

When to run:

before (insert)

Conditions : if any can be added

 

Advanced Script:

Add the below line in the script block. (Note: Make sure to add it in the function block, which exists by default)

current.short_description = "I want to add additional software to my laptop - " + producer.requested_for.name;

 


Mark the response correct and helpful if the answer assisted your question.