- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2020 09:26 PM
I can't find where HRJ Task Take Survey Widget is used. Can we make a survey as to-do task in Employee Service Center portal?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2020 01:06 AM
Hi Koji,
In short, you can by creating an Employee form. By creating a new HR Task of HR Task type "Collect Employee input" you can select the Employee form you want:
That will then be presented to the assigned to in the HRM To-do widget.
Technical longer explanation:
It is loaded in the to-do app via:
- HRM To-do contains the "To-dos task Line Item"-widget
- It will get the tasks that are to-do and their mapping to widget via the "todoPageUtils"-script include.
- The "todoPageUtils"-script include contains the function "_getWidgetMappings" which gets the mapping from the "sn_hr_sp_todos_widget_mapping"-table.
- In that table we find entries for HR Task:
- "HRM Task Activity"-widget calls "hr_TaskTicket"-script include. We are looking for the collect_information as that is the one containing a survey:
if (gr.hr_task_type == 'collect_Information'){
task.employee_form = {};
task.employee_form.id = gr.getValue('employee_form');
task.employee_form.form_definition = gr.getElement('employee_form.form_definition');
task.employee_form.survey_instance = gr.getValue('survey_instance');
task.employee_form.table_Name = gr.getElement('employee_form.table')+'';
task.employee_form.condition = gr.getElement('employee_form.condition')+'';
}
- The "HRM Task Activity"-widget in line 21 gets the widget for the specific task:
data.widget = $sp.getWidget(getTaskWidgetId('hrj-task-'), taskOptions);
if(!data.widget.sys_id)
data.widget = $sp.getWidget(getTaskWidgetId('hr-task-'), taskOptions);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2020 01:06 AM
Hi Koji,
In short, you can by creating an Employee form. By creating a new HR Task of HR Task type "Collect Employee input" you can select the Employee form you want:
That will then be presented to the assigned to in the HRM To-do widget.
Technical longer explanation:
It is loaded in the to-do app via:
- HRM To-do contains the "To-dos task Line Item"-widget
- It will get the tasks that are to-do and their mapping to widget via the "todoPageUtils"-script include.
- The "todoPageUtils"-script include contains the function "_getWidgetMappings" which gets the mapping from the "sn_hr_sp_todos_widget_mapping"-table.
- In that table we find entries for HR Task:
- "HRM Task Activity"-widget calls "hr_TaskTicket"-script include. We are looking for the collect_information as that is the one containing a survey:
if (gr.hr_task_type == 'collect_Information'){
task.employee_form = {};
task.employee_form.id = gr.getValue('employee_form');
task.employee_form.form_definition = gr.getElement('employee_form.form_definition');
task.employee_form.survey_instance = gr.getValue('survey_instance');
task.employee_form.table_Name = gr.getElement('employee_form.table')+'';
task.employee_form.condition = gr.getElement('employee_form.condition')+'';
}
- The "HRM Task Activity"-widget in line 21 gets the widget for the specific task:
data.widget = $sp.getWidget(getTaskWidgetId('hrj-task-'), taskOptions);
if(!data.widget.sys_id)
data.widget = $sp.getWidget(getTaskWidgetId('hr-task-'), taskOptions);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2020 05:55 PM
Hi Willem,
Thank you for your help. Let me check this later.
Koji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2020 11:53 PM
Hi Koji,
You are welcome. Can you please mark the answer as Correct if it works for you.
Kind regards,
Willem

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 05:51 AM
Cheers,
Mike