Create a Lookup for REST Service

To create a lookup for a REST service, do the procedure in this topic.

Video: Show Data from a Database on an eForm

Screen



How to Start

  1. On the Application Explorer screen, do one of these:
  2. Do one of these:
    • Add a Auto Lookup Auto Lookup icon control:
      1. On the eForm Builder screen, in the Toolbox, open the Advanced Controls Advanced Controls icon tab.
      2. On the Advanced Controls Advanced Controls icon tab, drag a Auto Lookup Auto Lookup icon form control onto your eForm.
    • Change a Auto Lookup Auto Lookup icon control:
      1. On your eForm, click the control, and click Edit Edit icon.
  3. On the Configure tab, click Add Lookup Add Lookup icon.

Procedure

  1. On the Select Data Source Type screen, select REST Service REST Service icon, and click Next.
  2. (Optional) On the Lookup Details screen, select Advanced Configuration.

    When you select this setting, you can only configure the Advanced Configuration tab. The the other tabs tabs are inactive.

  3. On the Lookup Details screen, in the Access Token field, select your REST service access token.

    To create a new access token, click Add Token Add Token icon. For more information, refer to Access Token for REST.

  4. In the Lookup Name field, enter a name for your lookup.
  5. Complete this field:
    Field Name Definition

    Lookup Type

    Function:
    Specifies the type of lookup procedure to do.
    Accepted Values:
    • Name/Value - The lookup gets data for specified name/value pairs.
    • Multiple Columns - The lookup gets data for more than one column.
    Default Value:
    Name/Value
    Example:
    Refer to:
  6. Click Next.
  7. On the Configure Lookup screen, do one of these:
  8. Click Finish.
  9. In the Bind Lookup Values To A Repeating Control (Optional) field, select a form control on your form to show the results of the lookup procedure.

    You can select a form control that can show repeating data. For example, Radio Button, Drop-Down List, or List Box.

  10. Complete the Execute This Lookup On field as necessary:
    Field Name Definition

    Execute This Lookup On

    Function:
    Specifies when the control does the data lookup.
    To Open this Field:
    1. In the Lookup Source field, select your lookup from the list.
    Accepted Values:
    • Form Load - Does the lookup when the form opens.
    • Related Field Value Change - Does the lookup when the value in a related field configured in your lookup changes.
    • Specific Field Value Change - Does the lookup when a value in a specific field on the eForm changes.
    • Form Load & Related Field Value Change - Does the lookup when the form opens or when there is a change in the value of the related field.

    In these settings, "related field value" means the value of a different field that can change the data the lookup gets. For example, changing the value of request mapping fields may change the data retrieved by a REST service lookup. Changing the value of a WHERE clause field may change the data retrieved by a database lookup. This setting monitors those fields and runs the lookup if the field values change.

    Default Value:
    Form Load & Related Field Value Change
  11. Complete the Execute on Session field as necessary:
    Field Name Definition

    Execute On Session

    Function:
    Specifies the sessions the lookup runs.
    Accepted Values:
    • First Session - The lookup runs only the first time the eForm loads in the form user's browser.
    • Subsequent Sessions - The lookup does not run the first time the eForm loads in the form user's browser, but runs all subsequent times the eForm loads.
    • Specific Sessions - The lookup runs only in the sessions, or page loads, specified by the numbers in the Enter Sessions field.
    Default Value:
    First Session