Need help on script to populate short description on RITM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 08:06 AM
Hi everyone,
I need to populate short description on RITM based on choices select through catalog. For example if I select Q1=a then Q2 selected choices on catalog need to populate on RITM short description or if I select Q1=b then Q3 selected choices on catalog need to populate on submitted RITM short description.
Can anyone help me with script for that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 08:24 AM
Hi @Nandini Gupta,
Yes, you can achieve this using either Flow Designer or a Business Rule to populate the Short Description on the RITM based on the selected catalog variables.
Option 1: Flow Designer
Create a flow and attach it to your Catalog Item. Use the "Catalog Item Requested" trigger. In the flow:
Add a action "Get Catalog Variables" step to access the values of Q1, Q2, and Q3.
Use a "update record" action to update the RITM's Short Description field based on the value of Q1.
Example logic:
If Q1 = a, populate from Q2
If Q1 = b, populate from Q3
Option 2: Business Rule
You can also use a Business Rule on the sc_req_item table (RITM) like this:
Use a Before Business Rule (on insert/update) so the short description is set before saving.
Ensure variable names (q1, q2, q3) match your actual variable names in the catalog item.
Regards,
Saadat Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 08:33 AM
@Nandini Gupta - Can you try this
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var q2 = g_form.getValue('Q2');
var q3 = g_form.getValue('Q3');
var shortDesc = '';
if (newValue == 'a') {
shortDesc = 'Request for Q2: ' + q2;
} else if (newValue == 'b') {
shortDesc = 'Request for Q3: ' + q3;
}
g_form.setValue('short_description', shortDesc);
}
✔️ If this solves your issue, please mark it as Correct.
✔️ If you found it helpful, please mark it as Helpful.
—
Shubham Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 12:47 PM - edited 07-09-2025 12:50 PM
Hello @Nandini Gupta,
Please try setting the values with flow designer. I am attaching the screenshot of flow you can refer and create same as it is it would work.
Hope my answer helps your requirement. Also feel free to ask if there is any doubt in the flow created in the screenshot attached.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Thanks and Regards,
Muskan