Autopoulation for variable list collector.

Atchutaram
Tera Contributor

Hi @everyone

I have a requirement where i need to auto populate all the groups from organization table to my catalog variable group.

I have a field in my table name as AD groups those should be auto populated in my catalog variable groups which is a list collector.

 

How can i do this?

 

Best Regards

8 REPLIES 8

@Atchutaram You already are passing a value for sysparm_org_sysid in the GlideAjax call from the onChange Catalog Client Script at this point:

ga.addParam('sysparm_org_sysid', newValue);

newValue comes from the onChange itself and represents the value that the field was changed to that triggered the onChange script execution. Since the field is assumed to be a reference field to the u_organization table it should be a sys_id.

@Atchutaram 

when you select the organization in organization reference variable, we are passing that value to ajax function and then getting the groups

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Atchutaram 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Atchutaram 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader