How to populate requester details in request additional field

How to populate requester details in request additional field

Requirement:
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
  1. $CS.setValue( "WorkOrder_Fields_UDF_CHAR1" , $CS.getValue("REQUESTER.user_udf_fields.udf_sline_1") );
Note:
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.

eg:
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");

To access the requester fields, enter $CS.getValue("REQUESTERS") in the browser console in the Request creation page. Ensure that the requester value has been properly set.

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to populate requester details in request additional field.

                      This sample script is to populate the requester details in a request additional field.  Based on the requester name selected, we can fetch the user additional field informations using Field and Form Rules (FAFR) and populate the content in request ...
                    • How to populate user names in a request additional field

                      This sample script is to populate both technician and requester names in a request additional field Use Case: Populate all user name in a request additional field. Execution Steps:  1.  Create a new 'Single Line' additional field and add them in the ...
                    • Script to Populate User Additional Field under Incident Template using FAFR

                      The script load the Requester Name under Incident Additional field ( As a pick list), by choosing the requester name under additional field the script populates the user additional field value. * Kindly create two additional fields under Admin -> ...
                    • Custom Module-Based Dependent Fields with FAFR

                      In the dynamic world of IT service management, form simplicity and accuracy play a major role in how smoothly requests are handled. However, many organizations face a recurring challenge—dependent field limitations within ServiceDesk Plus. Currently, ...
                    • How to populate requester details in request additional field using business rule.

                      This sample script is to populate the requester details in a request additional field.  Based on the requester name selected, we can fetch the user additional field information and populate the content in request additional field. Use Case:  Let us ...