Resources in Select Components

A Select component can list the submissions of a GlobalForms resource, for example vendors, departments or approvers. Users pick one, and the form keeps that record's data.

Set up the list

  1. On the Select component's Data tab, set Data Source Type to Resource.

  2. Choose the Resource, for example Vendor Details.

  3. Set the Item Template to the field users should see, for example <span>{{ item.data.vendorName }}</span>. Keep the HTML tag around the value. Use the property names from the resource's components, exactly as written on their API tab.

  4. Save and test the form.

Users only see resource records they have permission to read. Give the roles that use the form read access to the resource's submissions. See User Permissions.

What is saved

The whole selected record is saved with the submission, so all its fields can be used in scripts and mapped to PDFs, for example data.vendor.data.emailAddress.

Automatic selection

When the list contains only one record, it is selected automatically. Combined with a filter, this lets a form pull in a related record without asking the user, for example the approver for the user's department.

Filter and sort the list

Use Filter Query to limit which records are listed. Values in {{ }} are replaced with the form's current answers.

Goal

Filter Query

Only approvers in the department chosen on the form

data.department={{data.department}}

Sort by approver name, A to Z

sort=data.approver

Sort Z to A

sort=-data.approver

Sort by department, then approver Z to A

sort=data.department,-data.approver

Filter and sort together

data.department={{data.department}}&sort=data.approver

Without a sort, the newest records are listed first.

When the filter depends on another answer, set Refresh On to that component, for example Department, so the list reloads when the answer changes. Turn on Clear Value On Refresh to clear the selection at the same time.

Other settings

Setting (Data tab)

What it does

Select Fields

A comma-separated list of the resource fields to load, such as data.vendorName,data.emailAddress. Loading fewer fields makes long lists faster.

Search Query Name

The field searched when the user types in the list, for example data.vendorName

Limit

How many records load at a time. See Advanced Options On Data Bound Lists.

Save as reference

Saves a link to the record rather than a copy