in client script>> Onchange

nagarjunadn
Tera Contributor

Hi to all,

I need answer, here my question is

in client script>> Onchange  on incident form

Q). if category is 'network' then assignment group has to auto populate as network group? 

 

 

2 REPLIES 2

Pradeep Thipani
Mega Sage

Hi @nagarjunadn ,

 

Can you try by using Assignment lookup rule to populate group based on category? 

Navigate to-> Assignment lookup rules under System policy.Table:  dl_u_assignment

PradeepThipani_0-1732772924625.png

 

 

Sample OnChange script: 

 

  • Type: onChange
  • Table: Incident
  • Field: category

 

 

function onChange(control, oldValue, newValue, isLoading) {
    // Ensure this runs only when the category is changed and not during form loading
    if (isLoading) return;

    // Check if the category is "Network"
    if (newValue == 'Network') {
        // Set the assignment group to the network group
        g_form.setValue('assignment_group', 'Network Group Sys ID');
    }
}

 

 

Thanks,

Pradeep

 

 

 

PrashantLearnIT
Tera Sage

Hi @nagarjunadn 

 

Please Use Assignment Lookup rules to set assignment group based on category.