- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 12:59 AM
I have to add data to description on record Producer script field.
Look it's not as easy as i though, I have part of script which is working properly:
current.description = 'Store: ' + "\n" + producer.store.getDisplayValue() + "\n" +
'Division: ' + "\n" + producer.division.getDisplayValue() + "\n" + 'Department: ' + "\n"
+ producer.department.getDisplayValue();
current.short_description = 'Allocation Request';
And after that I want to add extra data to current.description if:
else if(producer.b_baby_boys_outerwear == 'true'){
current.description = 'baby: ' + "\n" + producer.b_baby_boys_outerwear;
}
but description is overwritten...
How to get resolve?
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 01:07 AM - edited 10-18-2023 01:09 AM
Hi @DIVI1
If I have understood your requirement correctly, this needs to be done in a single go.
if(producer.b_baby_boys_outerwear == 'true'){
current.description = current.description + 'baby: ' + "\n" + producer.b_baby_boys_outerwear;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 01:32 AM
It's working only when I'm using 'if', unfortunately not working with 'else if'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 01:35 AM
That is entirely possible of course, I don't know exactly how your variables are filled of course.
However the solution itself is correct, only the rest of your logic was not 😉
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 01:07 AM - edited 10-18-2023 01:09 AM
Hi @DIVI1
If I have understood your requirement correctly, this needs to be done in a single go.
if(producer.b_baby_boys_outerwear == 'true'){
current.description = current.description + 'baby: ' + "\n" + producer.b_baby_boys_outerwear;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 01:33 AM
Thanks Working properly!