Skip to main content

Control - API Query


Function: When creating or editing records, this control calls integrated APIs (or packaged business processes) to retrieve data and auto-fill fields/subforms in the current record, or push data externally.

Use Cases

  • Fetching business registration info

    Enter a company name → Pull its registration details from Tianyancha → Auto-fill worksheet fields.

  • Tracking logistics

    Input a tracking number → Retrieve shipping status → Auto-write to a logistics subform.

Field Configuration

Retrieve Single Row of Data

Use Case: Fetch a phone number's location info and auto-fill province/city fields.

1. Add an API Query control

2. Select API source

Options: Pre-integrated APIs or packaged business processes.

Demo uses a pre-integrated API.

Only authorized APIs are available.

3. Configure parameters

Parameters vary by API (auto-displayed based on API configuration).

4. Field display mode

Three display modes for API Query fields:

  • Button: Sends the request and retrieves results when clicked.

  • Dropdown List: Triggers the request when activated; displays returned multi-row data as dropdown options.

  • Searchable Dropdown List: Functions like Dropdown List but includes search capability.

Dropdown List/Searchable Dropdown List modes only work with multi-row data responses. For phone location APIs (single-row returns), only Button mode works. For multi-row examples, see the configuration samples in the following section.

5. Map returned data to fields

After configuring API and parameters, map returned data to target fields.

Rules for field mapping

Retrieve Multiple Rows of Data

Use Case: Enter a company name to retrieve business registration information via Tianyancha's API. Multiple matching companies (multiple rows of data) may be returned, with their details automatically written to corresponding fields.

1. Add an API Query control

2. Select the API

  • Only authorized APIs are available.

  • Configure required parameters (some may be required).

3. Configure parameters

Parameters vary by API and are auto-displayed based on configuration.

4. Field display mode

Three modes are available: Button, Dropdown List, and Searchable Dropdown List.

  • Button

    Requires entering a search keyword in another field.

    Retrieved multi-row data must be written to a subform.

  • Dropdown List/Searchable Dropdown List

    Enter keywords directly in the API query field.

    Search results appear as dropdown options. Select an option, and the relevant data will be written to regular fields (not subform) in the current record.

5. Button mode configuration

Map retrieved multi-row data to subform fields.

6. Dropdown List/Searchable Dropdown List mode configuration

Specify which returned field to display as dropdown options.

Additional settings for Searchable Dropdown List

Search Method:

  • Button-Triggered Search:

    Enter keywords → Click button to search and display options.

  • Real-Time Search:

    Automatically searches and displays options as you type (may incur higher API costs).

Minimum character length

If configured, requests are only sent when the entered keyword meets the minimum length requirement. This setting is particularly useful when the API's search parameters have character limitations.

Make a request before searching

When enabled:

  1. The searchable dropdown triggers an initial request upon activation
  2. Sends an empty search parameter to the API
  3. Uses returned results as preset dropdown options

Note: Only enable this option if the API supports empty search parameters.

Input parameters

In Searchable Dropdown List mode, the entered search content is directly passed to the API as a parameter.

Rules for field mapping