Assignment group in the incident form auto-populate based on the location in the record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 12:10 AM
Hi,
I want to create a record producer. I'm attaching the wireframe here. This is my requirement.
1. I have created some demo users and set their locations as India, US, LATAM and Turkey.In the record producer, in the Open on behalf of the user field, I will give a user who is affected with an issue. The location field in the record producer is dynamically populating based on the open on behalf of the user field. If the location field is populating with values India, US or LATAM I want the assignment group to be auto-populated with the group IT-EXPERIENCE. But I tried many methods and I didn't get it. Please help me on this.
2. If location field in the record producer is dynamically populated with Turkey, then another field is visible called Issue belongs to . It has 4 choices, IT, Lab, ServiceDEsk, SDE. If the location is dynamically populated with Turkey and if I select IT from the Issue belongs to field, then the assignment group in the incident has to be auto-populated with Turkey IT. Similarly, if the location is dynamically populated with Turkey and if I select Lab from the Issue belongs to field, then the assignment group in the incident has to be auto-populated with Turkey Lab.
How to do this? I'm trying this for a long time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 01:55 AM
Hello @NishaB
Write an onChange client script on the Location field to check the value and dynamically set the Assignment Group or show the Issue belongs to field for Turkey.
function onChange(control, oldValue, newValue) {
if (!newValue) return;
// Hide Issue belongs to field by default
g_form.setVisible('issue_belongs_to', false);
g_form.clearValue('issue_belongs_to');
// Auto-populate Assignment Group based on Location
if (newValue === 'India' || newValue === 'US' || newValue === 'LATAM') {
g_form.setValue('assignment_group', 'IT-EXPERIENCE'); // Replace 'IT-EXPERIENCE' with the sys_id of the group
} else if (newValue === 'Turkey') {
g_form.clearValue('assignment_group'); // Clear Assignment Group
g_form.setVisible('issue_belongs_to', true); // Show Issue belongs to field
} else {
g_form.clearValue('assignment_group'); // Clear Assignment Group
}
}
Write another onChange client script for the Issue belongs to field to dynamically set the Assignment Group when Location is Turkey.
function onChange(control, oldValue, newValue) {
if (!newValue) return;
// Check if Location is Turkey
var location = g_form.getValue('location');
if (location === 'Turkey') {
var assignmentGroup = ''; // Default value for Assignment Group
// Set Assignment Group based on the selected Issue belongs to
if (newValue === 'IT') {
assignmentGroup = 'Turkey IT'; // Replace with the sys_id of Turkey IT group
} else if (newValue === 'Lab') {
assignmentGroup = 'Turkey Lab'; // Replace with the sys_id of Turkey Lab group
}
g_form.setValue('assignment_group', assignmentGroup); // Set the appropriate Assignment Group
}
}
Note: Replace the country names in script with back-end value. Also replace 'IT', 'LAB' with the backend value configured in your instance.
Let me know if you need further adjustments or additional conditions!
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 03:40 AM
Issue belongs to is working. But setting the assignment group is not working. Can you please help me on this. The assignment group is not auto-populating in the incident record when the record producer is submitted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 03:59 AM
Hello @NishaB
When creating a record producer, you can map fields. Map the Assignment Group field in the record producer to the Assignment Group in the incident form.
This will automatically populate the input from the record producer form into the record created in the incident table.
Steps to add mapping of variables in record producer:
- In the record producer, open the variable assignment group
- Enable map and add fields as assignment group
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 10:46 AM
My earlier response assumed there was an Assignment Group variable present on the record producer form. However, based on the screenshot provided, it is clear that there is no such field on the producer form.
Please refer to my latest response, which addresses the scenario accordingly and provides a solution for dynamically populating the Assignment Group field on the resulting record.
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 03:48 AM
When I submit the Location field in the record producer, the change in assignment group has to be shown in the incident record