Requested for not populated in catalog item

Anna_Servicenow
Tera Guru

We have catalog item that doesn't have 'requested_for' (default one referring to user table), but another one with same name and its a choice (user or group).

 

Now, In the Request,RITM and SCTASK, the requested for is not populating on submitting Request. How can I fix this ?

11 REPLIES 11

* Condition: current.requested_for.nil() (If the requested_for field is empty)  

 

This part is not working, I guess the mapping is happening to the choice in request_for and in turn the value returned but not displayed. Any solution? 

Hi @Anna_Servicenow 

 

I m going to look on this on my end 

 


A simple request to you,I understand you want solution regarding this matter but If you like this opinion and your problem is resolved  or you get some benefit from earlier reply from my end after reviewing and applying it. Please kindly mark this your best answer🌠‌ OR  mark it  Helpful ‌‌ if you think that you get some insight from this content relevant to your problem and help me to contribute more to this community

 

I will definitely working on your matter.

MackI | ServiceNow Developer | 2 *Mainline Certification | LinkedIn Top IT Operation Voice 2023 | Sydney,Australia

hi @Anna_Servicenow 

 

Possible Issues & Solutions

 

 

If the value is returned as sys_id but not name then configure the table control Display Value--


Double-Check: Ensure that the new reference field you created (or the renamed field) is indeed named requested_for in the dictionary (without any typos or extra spaces).
Debugging: Add a logging statement to your Business Rule to verify which field the script is actually interacting with:


Choice vs. Reference: If you accidentally created a choice field instead of a reference field, the condition current.requested_for.nil() might not work correctly. It's designed for reference fields.

If you created a choice field, you'll need to adjust the condition to check if the choice value is empty

 

A small request from my end, If you like this opinion and your problem is resolved after reviewing and applying it. Please kindly mark this your best answer‌🌠‌ (Accepted Solution) OR  mark it  Helpful ‌ if you think that you get some insight from this content relevant to your problem and help me to contribute more to this community

MackI | ServiceNow Developer | 2 *Mainline Certification | LinkedIn Top IT Operation Voice 2023 | Sydney,Australia

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

You can use the b3wlow in a workflow script to map the variable 

current.<field name>= current.variables.<variable name>;

-Anurag