- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 02:04 AM
Hello,
How can I set the value of "Requested For" from the variables form in RIMT?
For example, if "Requested For" in the Variables is 'A' (blue), it should correspond to "Requested For" in the RIMT form ('A' in red).
meaning: Show the user that we requested for him the item( "requested for" )
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 02:13 AM
Hi @MaramA
Please try using this before BR on request table.
(function executeRule(current, previous /*null when async*/) {
var grRITM = new GlideRecord('sc_req_item');
grRITM.addQuery('request', current.sys_id);
grRITM.query();
while (grRITM.next()) {
if (!JSUtil.nil(grRITM.variables.requested_for)) {
current.requested_for = grRITM.variables.requested_for;
}
}})(current, previous);
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 02:12 AM - edited 05-23-2024 02:13 AM
Hi @MaramA ,
you can do this in catalog item process engine that may be a flow or workflow.
Regards,
Ranjit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 02:13 AM
Hi @MaramA
Please try using this before BR on request table.
(function executeRule(current, previous /*null when async*/) {
var grRITM = new GlideRecord('sc_req_item');
grRITM.addQuery('request', current.sys_id);
grRITM.query();
while (grRITM.next()) {
if (!JSUtil.nil(grRITM.variables.requested_for)) {
current.requested_for = grRITM.variables.requested_for;
}
}})(current, previous);
Thanks
dgarad