Adding requested for to variable set

ServNowDev
Tera Guru

is the requested for variable type able to be added to a variable set? getting this error

Screenshot_2025-09-02_at_4.04.44_AM.png

12 REPLIES 12

RaghavSh
Kilo Patron

Delete this and try creating the variable with same name in variable set.

I believe there is an OOB before BR running which is restricting this movement. 


Raghav
MVP 2023
LinkedIn

No mate, it’s an OOB (out-of-the-box) field. Deleting it would not be a good practice.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Agreed. I thought is a custom variable being moved from variable set to catalog item


Raghav
MVP 2023
LinkedIn

Shashank_Jain
Kilo Sage

@ServNowDev ,

 

Add that in the variable set directly.

Create new variable of type requested for  in the variable set "Test Variable set".

Question - You wanted this on both variable set and catalog variables?

You needed 2 variable?

 

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain

Ravi Gaurav
Giga Sage
Giga Sage

Hi @ServNowDev 

Why you’re seeing the error

  • The Requested For variable is a special system-provided variable tied to catalog items.
  • It isn’t a standard variable type like Single Line Text, Reference, Choice, etc.
  • Because of this, when you try to add it to a Variable Set, the platform throws an error - ServiceNow doesn’t allow placing that special variable type in a reusable set.

 

If you need to include something equivalent in a variable set:

Create a Reference variable in your variable set.

Table: sys_user

Name it something like requested_for (or another logical name).

Configure default value as javascript:gs.getUserID() (if you want it to default to the logged-in user).

Apply catalog client scripts / UI policies if you need to mimic the OOB “Requested For” behavior.

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/