Populate field values in an editable table and copy it to the request description.

Populate field values in an editable table and copy it to the request description.

This post describes the use of a Field and for rule script to populate the value of the given fields in the editable table and same table data will be copied in the description.

UseCase:
Let us consider a scenario where travel request form is created. User need to select hotels for a tour, as there might be more than one hotel stays in a single tour. For this business requirement, we can populate the value of the given fields in the editable table and same table data will be copied in the description.

For Builds after 11200:
Execution steps:
1. Create the additional fields in the section of a template.
2. In FAFR, on form load add the attached script addResource.txt. Modify the display_name and fafrKey in the script.






For Builds before 11200:
Execution steps:
1. Create the additional fields in the section of a template.
2. In FAFR, on form load add the attached script EditableTableForFieldValues.js. Modify the field_headers and field_array variable in the script.
Give the field names in the 'field_headers' variable and give the FAFR field ids in the 'field_array' variable.
3. In FAFR, on form submit add the attached script EditableTableOnSubmit.js.













                  New to ADSelfService Plus?

                    • Related Articles

                    • 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 ...
                    • Additional field values

                      This report helps to find the picklist values in the additional fields. First you need to find the name of the table and the column holding the data, by executing the following SDP query report:  SELECT Tablename, Columnname FROM ColumnAliases WHERE ...
                    • Parsing Request Description to Populate Additional Field Values

                      Use Case: When a user submits a request with a detailed description that contains structured information—such as issue category, priority, and location—the system can automatically parse this information and populate the corresponding additional ...
                    • Update Requester from Request Description

                      Use case: When a request is submitted on behalf of a user via email, the request description contains the requester's full name. Script to update the ticket requester accordingly. Tested on builds: 14306,14500. Steps to follow: Go to Admin > Request ...
                    • Rename request description in translations

                      In translations, there are many descriptions, to identify request description and modify, follow the steps below, 1. Navigate to Admin->Translations page and search for "description". 2. A list of matches will be loaded. Now press F12 button. Make ...