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.

Populate first selected user Email id from Multi-Select "Requested For" Field in Catalog Item

tulasi8
Tera Contributor

Hi Community,

 

I’m working on a catalog item where the "Requested For" field needs to support multiple selections, so I’ve configured it using a List Collector.

Additionally, I’ve created a second variable to capture the email address of the selected user(s. This variable is of multi-line text type, and I attempted to autopopulate it using a dependent question and dot-walk path from the "Requested For" field. However, this approach does not work with List Collector variables.

To test the functionality, I temporarily changed the "Requested For" field to a Reference type, and the email autopopulation worked as expected. However, this does not meet the requirement, as I need to allow multiple user selections and populate only the first selected user's email ID in the second variable.

Could you please advise on how to achieve this functionality? Any guidance or recommended approach would be greatly appreciated. @Ankur Bawiskar 

 

Regards,

Tulasi

7 REPLIES 7

@Ankur Bawiskar  Since we are working on a shared instance, creating Script Includes is not recommended. Doing so could lead to conflicts or issues in the future.

@tulasi8 

I don't think any issue will occur even though you are working on shared instance.

if not GlideAjax then you will have to use onChange client script with callback method for GlideRecord

(GlideRecord) [Q:NOCB] Query must be called with a callback function 

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

@tulasi8 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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