If a role is selected only few programs should be displayed

sasanga
Mega Explorer

There is a custom table u_program.

If any role is selected based on selection few programs should be displayed. But once we select any role it is displaying all program list which ever available in the u_program table. 

 

Only the below mentioned programs should be displayed. 

 

sasanga_0-1738315039407.png

sasanga_1-1738315143497.png

 

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@sasanga If your Programs filed is a reference field then you can use a Reference qualifier to filter choices in the Programs field based on the value chosen in the Role field.

 

For more information please refer to https://www.youtube.com/watch?v=ThQ2Dl2UIdA

 

If your programs field is a choice field then you can use g_form.removeOption('field_name','choice') to remove choices in an onChange client script on the Roles field.

 

You can take inspiration from there thread here https://www.servicenow.com/community/developer-forum/client-script-to-remove-option-from-select-box-...