Requested for not populated in catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 04:15 AM - edited 07-15-2024 04:15 AM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 06:34 AM
* 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 07:15 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 07:11 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 04:29 AM
Hi,
You can use the b3wlow in a workflow script to map the variable
current.<field name>= current.variables.<variable name>;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 04:33 AM
You can also use this
(1) Record Producer map to field on… Variable Sets! - ServiceNow Community