- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 08:39 AM
Created a catalog item 'Request for Software'. Add the below variables to it
- Requested for — reference to user table
- Manufacturer — reference to 'Manufacturer' table
- Software — reference to 'Software' table
- Business justification — Multiline text
Created a field 'Software' on 'Request' table and once the request is submitted, This field should have the value selected by the user for 'Software' variable in 'Request for Software'. Change the form lay out to show this field on Request item form.
Plz Help to slove this ....
Thanks in Advance.
Arun.T
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 08:54 AM
Hi Arun,
You can access the value of the variable in your workflow. You can access it by- current.variables.software this will be a sys_id of the record.
Similarly you can store the value in the request table by accessing the request tables variable as - current.request.software you just have to pass the variables in the workflow.
Write a runscript activity in the workflow attached in 'Request for Software' and modify the below code with the variable names and update-
var gr= new GlideRecord('sc_request');
gr.addQuery('sys_id',current.request);
gr.query();
if(gr.next())
{
gr.field_name_of_software_in_request_table=current.variables.variable_name_of_software_in_catalog_item;
gr.update();
}
You can add this field in request item as well by configuring form layout.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 08:51 AM
Hi Arun,
A before insert business rule on sc_request table with below code would suffice what is required.
- var grRITM = new GlideRecord('sc_req_item');
- grRITM.addQuery('request', current.sys_id);
- grRITM.query();
- while (grRITM.next()) {
- if (!JSUtil.nil(grRITM.variables.variable_name)) { //replace variable_name with the name of software variable
- current.requested_for = grRITM.variables.requested_for; //I am assuming requested_for variable here from form.
- }
- }
Thanks
Jaspal Singh
Hit Like or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 08:54 AM
Hi Arun,
You can access the value of the variable in your workflow. You can access it by- current.variables.software this will be a sys_id of the record.
Similarly you can store the value in the request table by accessing the request tables variable as - current.request.software you just have to pass the variables in the workflow.
Write a runscript activity in the workflow attached in 'Request for Software' and modify the below code with the variable names and update-
var gr= new GlideRecord('sc_request');
gr.addQuery('sys_id',current.request);
gr.query();
if(gr.next())
{
gr.field_name_of_software_in_request_table=current.variables.variable_name_of_software_in_catalog_item;
gr.update();
}
You can add this field in request item as well by configuring form layout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 09:37 AM
Hi Manoj,
Could this work if the field is on the Requested Item table? The field on the RITM is called "u_leader_approving." It is a reference field on the requested item table that I am trying to populate from (either) a lookup select box or a reference field from the catalog item. (I named the field on the catalog item "u_leader_approving" as well.)
Ultimately, I'm trying to kick off a passive notification to the manager in that field letting them know the team member has put in a request. The manager doesn't need to approve it; it's just for awareness.
thanks,
Richelle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 02:10 AM
Hi Richelle,
If you are trying to update any field in RITM level from the field which is filled up in the catalog item then you need to write-
current.u_leader_approving= current.variables.u_leader_approving;
But if your ultimate goal is to send a notification to the Manager then you can add a notification activity in your workflow and send the notification to the request.requested_for.manager, Why are you creating a new field for it ?