Add requested for to service catalog

will_smith
Mega Guru

My client is wanting to add the Requested For (requested_for) field to some catalog items. I know how to add the reference field to the user record and populate the default value with the current user. What I am having some trouble with is then getting that field to show up in the cart's order status page as well as reflecting on the REQ/RITM - the field is already added to the form, it's just not updating with the catalog item information. I am definitely going to need some help with this, as I've not edited the cart before.

Below are the steps I have taken so far...

  1. I've added Requested For (requested_for) to my test catalog item form.
  2. Add requested for to the order status page. I was able to complete that with this cart widget macro: Create macros for cart layout example. Order Status_ REQ0016234 _ WESCODEV - ServiceNOW_06-03.png
  3. I've looked at this community article on populating the Request with the catalog item variable, but have yet to implement it successfully. How do I add a requested for field on a request form in a service catalog?

To sum up, what I'm needing help with is taking the requested for variable from the catalog item and pushing it to the cart order status page, and the request/requested item(s) that gets created.


Thank you for your help!

1 ACCEPTED SOLUTION

HugoFirst
Kilo Sage

That is an excellent question William!         I suppose you are referring to a situation where each requested item may have a different person in the requested_for field.   If this is the case, then the request record by itself is not adequate to reflect that situation, as it's "requested_for" field can only handle a single value.



Here's my ideas for this situation:


1. On your catalog item, add a field for "Requested For".


2. On the requested_item form, add the "Variable Editor".   All variables on the catalog item will now display on your requested item record.



find_real_file.png



Give you something like this on your requested item record:


find_real_file.png


View solution in original post

18 REPLIES 18

HugoFirst
Kilo Sage

May I propose another alternative?   Why not just add the requested_for field in the request record to the requested_item form?


find_real_file.png


One advantage of this is that the field will always be current and consistent between the 2 records.   If you copy it, that may not always be the case.


I had given that a shot Steve, but what if the request has multiple items on it, say from a user list collector. How will that be handled?


HugoFirst
Kilo Sage

That is an excellent question William!         I suppose you are referring to a situation where each requested item may have a different person in the requested_for field.   If this is the case, then the request record by itself is not adequate to reflect that situation, as it's "requested_for" field can only handle a single value.



Here's my ideas for this situation:


1. On your catalog item, add a field for "Requested For".


2. On the requested_item form, add the "Variable Editor".   All variables on the catalog item will now display on your requested item record.



find_real_file.png



Give you something like this on your requested item record:


find_real_file.png


will_smith
Mega Guru

That is how I have it currently, just as you suggested. I think I just need to explain that to the client.