- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 02:09 AM
Hi everyone!
I need this requirement where, when I select a value in "Service offering" field, I want to auto populate the "Service" field based the Parent field of the selected "Service offering"
Example below:
If "Service offering" = Offering v1 , then, "Offering" = SAP Enterprise Services
Hope you can help me out 🙂 Thank you in advance everyone!
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 02:34 AM
Hello,
Write a On change client script on service offering table:-
Use the below code:-
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var caller = g_form.getReference('service_offering', setLocation);
function setLocation(caller) {
if (caller)
g_form.setValue('business_service', caller.parent);
}
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 02:12 AM
Hi Sabrina,
Just for one field you can use g_form.getReference functionality and then dot walk to the parent field from your service offering field and use that value to populate it in your service field.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 06:38 PM
i used this code in client script , but it's not auto populating the Offering field
function onChange(control, oldValue, newValue, isLoading, isTemplate) { if (isLoading || newValue === '') { return; } var caller = g_form.getReference('service_offering', setLocation); function setLocation(caller) { if (caller) g_form.setValue('business_service', caller.parent); } }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 02:34 AM
Hello,
Write a On change client script on service offering table:-
Use the below code:-
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var caller = g_form.getReference('service_offering', setLocation);
function setLocation(caller) {
if (caller)
g_form.setValue('business_service', caller.parent);
}
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 06:35 PM
Hi @Saurav11
Tried creating an onchange client script in incident table, per your screenshot. Added the script, but unfortunately, it's now working. Let me know If I missed something..
Thank you!!