Add data links to the form

After you have added the new page and questions to capture visa information, next we must add the data links that will write this information to the Visas object when the form is submitted.

Add data link rules

  1. On the Form Definition page, select the Data Links tab.

    Screenshot: form definition page, data links tab

  2. Select New Rule.

    Screenshot: new rule button on the data links tab

  3. Begin configuring the rule as follows:
    • Form Field: VisaCountry1
    • Direction: In

    Screenshot: creating a new data link rule

  4. Select Advanced rule.

    The Form Field and Data Field picklists become the editable fields Form Data Name and Object Field Name.

  5. In the Object Field Name field, enter the API name of the record we need to update. Because we will be updating 3 sets of records, we will use the [0], [1], [2] numbering convention to identify each record. Enter:

    fHCM2__Team_Member__r.Visas__r[0].fHCM2__Country__c

    For information on how to create an object field name/API name for a linked record, and how to create multiple records, see Advanced data link rules.

    Note

    In this case you must enter the Object Field Name manually.

  6. Enter a condition to ensure that the rule does not create a record if the field is not entered by the user:

    NOT (VisaCountry1 = "-Please Select-")

  7. Select Save.
  8. Complete the rest of the rules as follows. Mark all rules as Advanced rule, with the direction: In.

    Screenshot: completed advanced rules

    Form Data Name Object Field Name Condition
    VisaCountry1 fHCM2__Team_Member__r.Visas__r[0].fHCM2__Country__c NOT (VisaCountry1 = "-Please Select-")
    VisaNumber1 fHCM2__Team_Member__r.Visas__r[0].fHCM2__Visa_Number__c NOT (ISBLANK(VisaNumber1))
    VisaExpiry1 fHCM2__Team_Member__r.Visas__r[0].fHCM2__Expiry_Date__c NOT (ISBLANK(VisaExpiry1))
    VisaCountry2 fHCM2__Team_Member__r.Visas__r[1].fHCM2__Country__c NOT (VisaCountry2 = "-Please Select-")
    VisaNumber2 fHCM2__Team_Member__r.Visas__r[1].fHCM2__Visa_Number__c NOT (ISBLANK(VisaNumber2))
    VisaExpiry2 fHCM2__Team_Member__r.Visas__r[1].fHCM2__Expiry_Date__c NOT (ISBLANK(VisaExpiry2))
    VisaCountry3 fHCM2__Team_Member__r.Visas__r[2].fHCM2__Country__c NOT (VisaCountry3 = "-Please Select-")
    VisaNumber3 fHCM2__Team_Member__r.Visas__r[2].fHCM2__Visa_Number__c NOT (ISBLANK(VisaNumber3))
    VisaExpiry3 fHCM2__Team_Member__r.Visas__r[2].fHCM2__Expiry_Date__c NOT (ISBLANK(VisaExpiry3))

Test the form

Make sure you test the form to ensure the pages and questions are behaving as expected, and the data links are writing information correctly. You can test the form using a sandbox environment, or publish the form to WX using a policy and users reserved for testing.