- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 06:14 AM
Hi Experts ,
We have created a record producer for submitting HR Case and as per requirement there are variables which need to be filled after HR Case gets approved . These variables need to be filled by "opened by" user . i have set this up by making variables editable from client script and opened by user can fill these variables from native view ( fulfiller view) . But most of employee who raise cases using this record producer are end user and they submit cases from service portal .
Can we view these variables on portal for end users ? or can we have some task which will map values to the parent HR case . ?
PFB snapshots
1) Native view variables made editable -
2)Portal view in which variables either need to be visible for users to fill or any workaround to get values from users and put into these variables
Solved! Go to Solution.
- Labels:
-
HR Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2020 01:29 AM
Hi All ,
Thank you for your response . We created a new record producer .It has a reference field which refers to hr cases which are approved and are generated using earlier record producer .Because client instance does not have option for "Collect Employee Input" type for creating a task .In new record producer we created variables of reimbursement section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2020 01:29 AM
Hi All ,
Thank you for your response . We created a new record producer .It has a reference field which refers to hr cases which are approved and are generated using earlier record producer .Because client instance does not have option for "Collect Employee Input" type for creating a task .In new record producer we created variables of reimbursement section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2020 01:33 PM
Hi,
I have the same requirements as you.
And they haven't found a solution yet..
Can you share how the field that refers to the HR case was specifically implemented?
Also, are you not using BR etc.?
Thanks in advance,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 01:38 AM
Hi Mi ,
We created a new record producer which has a reference variable in order to get apporoved HR cases .I used reference qualifier on this variables which filters only the approved HR cases for certian HR service .
so we have two forms now , one form is for requesting approval and another one is for initiating reimbursement. Reimbursement form uses a reference variable to the approved cases and I have used onChange client script and script include to fill some variables from approval form onto the reimbursement form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 01:53 AM
Hi sharayukasar,
And sorry for the many questions.
How do you share a reference variable with a second Record Producer?
Is it a reference variable that links the two forms?
Also, could the value entered on the first RP be retrieved and displayed on the second Record Producer?
I have also implemented it up to the point of creating two Record Producer, but I have not advanced it.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 05:17 AM
PFB answers -
1) I have created a reference variable on the second record producer . This reference variable used table as "sn_hr_core_case" table and reference qualifier to filter only the cases which are approved and are created using first record producer.
2) Reference variable is only linked to second form . cases created using my first form gets closes completed once those are approved.
3) Value entered on first RP will get stored in variables on case created . So using script include and client script we can fetch the values entered and copy those to another variables created on second variable.
On Change client script will look like below - on change variable will be your reference variable
var ga = new GlideAjax('Script Include Name');
ga.addParam('sysparm_name', 'Function name');
ga.addParam('sysparm_var', newValue);
ga.getXML(GetValueParse);
function GetValueParse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
var array = answer.split(','); // I am passing values as array from server side
g_form.setValue('variable name on second form', array[0]); // here set values of variables on second form.
}
Your Script Include will look like below -
var arr_hrCase = '';
var hr_caseID = this.getParameter('sysparm_var');
var gr_hrcase = new GlideRecord('sn_hr_core_case');
gr_hrcase.addQuery('sys_id', hr_caseID);
gr_hrcase.query();
if (gr_hrcase.next()) {
var arr_hrCase = gr_hrcase.variables.name_of_variable_from_first_form_1 + " , "+gr_hrcase.variables.name_of_variable_from_form_2;
}
return arr_hrCase;
},
Let me know if you find it helpful 🙂
