Populate requester additional field information into request additional field.
Usecase:Let us consider a scenario where certain employee details are imported from the Active Directory into User - Additional Fields. The business requirement is to populate these details in the request.
To do this, an additional field common to both incident and service request templates can be added under Admin Tab >> Incident Additional Fields.
The next step is to enable additional fields for requester login.
Go to Application Settings and enable the below:
Configure the script in Field and Form Rule on form submit to get the value from the User - Additional field and populate that into the request additional field.
Add the newly created additional field into the required template.
Configure a FAFR > On Field Change - Requester field.
Under Action > Execute script - add the below script
- $CS.setValue( "WorkOrder_Fields_UDF_CHAR1" , $CS.getValue("REQUESTER.user_udf_fields.udf_sline_1") );
WorkOrder_Fields_UDF_CHAR1 >> Request Additional Field
REQUESTERS.user_udf_fields.udf_sline_1 >> Requester Additional field
$CS.getValue("REQUESTERS.user_udf_fields,udf_sline_1"); >> This can be modified to any of the requester fields, as per your requirement.
For ReportingTo Name: $CS.getValue("REQUESTERS.reporting_to.name");
For ReportingTo Email: $CS.getValue("REQUESTERS.reporting_to.email_id");
For EmployeeID: $CS.getValue("REQUESTERS.employee_id");