How to make a request for multiple users updating the details for multiple users

divyal09
Tera Contributor

I want to submit request for multiple users using also request for but I also want to update email, employee number and PUBEDU Id for all the users selected in "Also request for" field on the form and also on the RITM. Please suggestServiceNow_AutoPoPulate.png

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@divyal09 

you can write onChange catalog client script + GlideAjax so that you can bring in the email address, ID number and other attribute and place them in the other readonly variables

Populate Email Addresses of users selected in List Collector variable to Multi Line Text Variable 

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

@divyal09 

If your customer wants 1 REQ and it should contain request details for multiple users then please use approach of MRVS shared by @Uncle Rob 

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

J Siva
Tera Sage

Hi @divyal09 
If you use 'Also request for', the system will create RITMs for individual users separately. Having email, employee number, and PUBEDU ID on the catalog form (Portal view) doesn't make any sense. Therefore, create a catalog UI policy to always hide these fields in the service portal. Then, create a business rule to populate the field values in each RITM based on the 'Requested for' field.
Sample:

UI policy: 

JSiva_0-1745840334696.png

Business rule:

JSiva_1-1745840380199.png

JSiva_2-1745840420878.png

(function executeRule(current, previous /*null when async*/) {

	//MODIFY THE FIELD NAME AS REQUIRED
	var email = current.requested_for.email;
	var user_id = current.requested_for.user_name;

	current.variables.email = email;
	current.variables.user_name = user_id;


})(current, previous);

Regards,
Siva

 

 

Uncle Rob
Kilo Patron

I think a better approach is use of Multi Row Variable Sets.
Because as I understand it, each user will have a different email address, ID number, and PUBEDU ID?
MRVS will allow you to enter multiple line items per request.
You also have the benefit of being able to do a FOR EACH in flow designer on the MRVS.... so you can literally do a catalog task per line item if you wanted to.