- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 12:19 AM
Hi
I have raised a two RITMs that are a part of one request (REQ#######)..
Here my defect is I need Two "request for" fields in two RITMs should be same..but it is working only for one
For example
RITM for 1st( RITM11111)
Request for = aaaa
under variables
request for = aaaaa
where as for 2nd RITM(RITM22222)
Request for = aaaa
under variables
request for = bbbb
Here i need for 2nd RITM (RITM22222)
request for = bbbb
under variables
request for = bbbb
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 12:34 AM
The requested_for field is not actually a field on the sc_req_item table, but on the sc_request table.
If you right click the field on sc_req_item table and select show - 'requested_for' it will open a small popup that shows "sc_req_item.request.requested_for".
Each Request is therefore always for 1 person no matter how many RITM's you include.
Rather in your case you could consider that if manager (or whoever) is ordering the RITM's then they'd be the requested_for for all and then separately have a variable which holds the actual recipient.
Otherwise you'd have to create your own custom requested_for field on sc_req_item and use that instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 01:06 AM
Hi
And also please share screen shoot for it if possible like how we can proceed
Otherwise you'd have to create your own custom requested_for field on sc_req_item and use that instead
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 01:18 AM - edited 12-09-2022 01:19 AM
@Dileep Raju Tried and tested solution
Create a Business Rule on RITM as follows
Script:
(function executeRule(current, previous /*null when async*/) {
current.requested_for = current.variables.requested_for;
})(current, previous);
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 02:12 AM
@Dileep Raju Cant' exactly say why its not populated in second RITM? It depends on the logic you built in the catalog item and workflow.
Which screen shot you want i did not get that?
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2022 08:27 PM
@Dileep Raju There are 2 "Requested for" fields on the RITM table, one is its own field and one more is the "Request" table field. (please see image below)
In list view above you can see those 2 fields.
In the form view you can notice the field "Requested for" added on the form is of "Request" field not of RITM field.
And "Requested for" of Request is only one person.
And through our script we are populating the RITM "Requested for" field. So please add the RITM "Requested for" field on form OR check the RITM "Requested for" field populated in the list view.
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 12:34 AM
The requested_for field is not actually a field on the sc_req_item table, but on the sc_request table.
If you right click the field on sc_req_item table and select show - 'requested_for' it will open a small popup that shows "sc_req_item.request.requested_for".
Each Request is therefore always for 1 person no matter how many RITM's you include.
Rather in your case you could consider that if manager (or whoever) is ordering the RITM's then they'd be the requested_for for all and then separately have a variable which holds the actual recipient.
Otherwise you'd have to create your own custom requested_for field on sc_req_item and use that instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 01:04 AM
Hi
Mega Guru
Thank you for quick reply
In Personal development instance it is working as expected.
Could you please let me know what will be the issue.....please share screen shot
For example
For One request( REQ#####)
RITM for 1st( RITM11111)
Request for = aaaa
under variables
request for = aaaa
where as for 2nd RITM(RITM22222)
Request for = aaaa
under variables
request for = bbbb
Here i need for 2nd RITM (RITM22222)
request for = bbbb
under variables
request for = bbbb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 01:06 AM
Hi
And also please share screen shoot for it if possible like how we can proceed
Otherwise you'd have to create your own custom requested_for field on sc_req_item and use that instead
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 01:18 AM - edited 12-09-2022 01:19 AM
@Dileep Raju Tried and tested solution
Create a Business Rule on RITM as follows
Script:
(function executeRule(current, previous /*null when async*/) {
current.requested_for = current.variables.requested_for;
})(current, previous);
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023