Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

HRM vs HRJ Widgets

cwillard
Tera Expert

Hello, 

 

I am working on our portal preparing for the Utah upgrade and I noticed we currently use the HRJ widgets on our HR Case overview page, but there are also HRM widgets that seem to do the same thing but have a better UI. We are using the EC Theme.

 

What is the difference between these widgets? Is it better to use one over the other? 

 

 

1 ACCEPTED SOLUTION

Amit Gujarathi
Giga Sage
Giga Sage

Hi @cwillard ,
I trust you are doing great.
Please find the diffrence as given below :

Feature HRM Widget HRJ Widget

Widget TypeAngularJSJelly
Data SourcesServiceNow tablesXML files
User InterfaceModern and intuitiveLimited customization
ConfigurationLimitedHighly configurable
PerformanceSlower due to AJAXFaster due to caching
IntegrationLimitedHighly integrated
Code Example<sp-widget widget="hrm-case-list"></sp-widget><j:jelly xmlns:j="jelly:core">...</j:jelly>

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hi @cwillard ,

Technically, both works together or you can say HRJ can be used inside HRM.

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:

SandeepDutta_0-1682401822368.png

 

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:SandeepDutta_1-1682401822413.png

     

  • "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);

To learn more , read the thread : https://www.servicenow.com/community/hrsd-forum/hrj-task-take-survey-widget/m-p/1283847

 

Amit Gujarathi
Giga Sage
Giga Sage

Hi @cwillard ,
I trust you are doing great.
Please find the diffrence as given below :

Feature HRM Widget HRJ Widget

Widget TypeAngularJSJelly
Data SourcesServiceNow tablesXML files
User InterfaceModern and intuitiveLimited customization
ConfigurationLimitedHighly configurable
PerformanceSlower due to AJAXFaster due to caching
IntegrationLimitedHighly integrated
Code Example<sp-widget widget="hrm-case-list"></sp-widget><j:jelly xmlns:j="jelly:core">...</j:jelly>

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi