- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:40 PM
Trying to enter the question with answer on a single line in the description field of incident after the record producer is submitted. The below code i have works to pull the variables in but it puts them all on the same line without any spaces.
Question 1: Description
Question 2: Description_2
Question 3: contact_phone
//////
current.description += producer.description; //gives answer for description into incident description
current.description += producer.description_2; //gives answer for description2 into incident description
current.description += producer.contact_phone; //gives answer for contact phone into incident description
The above code works by pulling in data but it is all connected without spaces. is there a way to script this so it pulls the data to look like below in description field? Trying to add it on a different line in description but just a space would accomplish the end goal.
Question 1: Description + 'Question answer'
Question 2: Description_2 + 'Question answer'
Question 3: contact_phone + 'Question answer'
Solved! Go to Solution.
- Labels:
-
Script Debugger
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:45 PM
Hi,
For adding space you can simply add +' '+ in your code as below.
current.description += ' ' + producer.description;
current.description += ' ' + producer.description_2;
For new line simply use /n.
Mark this as Helpful/Correct, if Applicable.
Regards,
Sourabh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:45 PM
Hi,
For adding space you can simply add +' '+ in your code as below.
current.description += ' ' + producer.description;
current.description += ' ' + producer.description_2;
For new line simply use /n.
Mark this as Helpful/Correct, if Applicable.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:49 PM
Marked as correct thank you Sir.