Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Get user details in the List collector variable on the catalog form

Samiksha2
Mega Sage

Hi,

I have a custom table(u_userslist) in which two fields are of List type(Primary users and Backup users). 

I want to auto-populate all the selected Primary users and Backup users in the List collector variable(all_users) on the catalog form.

Thanks

1 ACCEPTED SOLUTION

Hi,

this variable "all_users" refers to sys_user

So this variable should auto-populate with Primary and Backup users.

you can use onChange on select box reference variable + GlideAjax and fetch the primary + backup users and set it on list collector variable

refer my blog for the same; If my blog helps please mark it helpful and also bookmark it

Dynamically set list collector on change of variable

Regards
Ankur

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

View solution in original post

9 REPLIES 9

Hi,

So you can select record from that table using reference/list variable

populate where? in some other variable on catalog item?

Regards
Ankur

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

Yes.
In one variable we are referencing to the u_userlist table [u_name]. Once name is selected based on that in the All user[List collector] variable Primary and backup user list will autopopulate as a List collector.  

@Samiksha 

I have written blog for this and it has the solution.

You need to enhance it further.

Regards
Ankur

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

Hi,

this variable "all_users" refers to sys_user

So this variable should auto-populate with Primary and Backup users.

you can use onChange on select box reference variable + GlideAjax and fetch the primary + backup users and set it on list collector variable

refer my blog for the same; If my blog helps please mark it helpful and also bookmark it

Dynamically set list collector on change of variable

Regards
Ankur

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

@Samiksha 

Glad to know that my comment worked.

Please mark response helpful as well and also mark blog as helpful if it helped.

Regards
Ankur

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