Auto Populate two field values in short description field on sc_task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 02:20 AM
Hi Experts,
Can you help me with small requirement.
Need to auto populate two field values in short description field after the request is submitted. Field variables "field_name" "program_request".
When user fills his response against this two fields its should auto populate in the short description field.
I even tried current.short_description =("Field Name")+ current.variables.field_name+ "\n" + ("Program request")+current+variables.program_request ;
It's not working , Please can anyone help me its urgent/priority.
Thanks,
tsai.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 05:00 AM
The unnecessary parenthesis and errant + are throwing it off. Try this:
current.short_description = "Field Name " + current.variables.field_name + "\nProgram request " + current.variables.program_request;
Are you using this in a workflow Run Script, or Business Rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 05:48 AM
If you are doing it in Business rule:
(function executeRule(current, previous /*null when async*/) {
var field_name = current.variables.field_name;
var program_request = current.variables.program_request;
var shortDescription = "Field Name: " + field_name + "\nProgram Request: " + program_request;
current.short_description = shortDescription;
})(current, previous);
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 06:05 AM
@tsai25044 Update your script as follows.
current.short_description ="Field Name "+ current.variables.field_name+ "\n" + "Program request "+current.variables.program_request;
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2024 06:19 AM
Hi @tsai25044 ,
If you need the code with braces try the below script,
current.short_description ="("+"Field Name "+")"+ current.variables.field_name+ "\n" +"("+"Program request "+")"+current.variables.program_request;
If it is helpful please make it correct/helpful.
Thanks and Regards,
Allu Gopal.