ActiveManage Docs ← Back to activemanage.co.uk

AJAX Search (DB) Field

Type-ahead search against another datastore. The user starts typing, the platform queries the source table in the background, and matching results appear in a dropdown for selection.

Conditional options

  • Data Source (Required) — which table the search runs against.
  • Fields to Search (Required) — which columns the user's typed query is matched against.
  • Unique Key Field (Required) — this will normally be ID (with no quotes). The value of this column is what the field stores.
  • Minimum Characters (Required) — the minimum number of characters to perform AJAX request.
  • AJAX Delay (milliseconds) (Required) — the length of time to wait for the user to finish typing before submitting the AJAX request. This delay is reset each time the text in the field is changed. Once the field is unedited for the amount of time specified, the AJAX request is submitted.
  • Max Results (Required) — the number of results to show that match the criteria, all other results will be hidden.
  • Output Format (Required) — how would you like the results displaying?
  • Output String To Show — use %%FieldName%% (replacing FieldName with the actual field name) to use any field from the returned data. If blank, an array of all the data will be returned.
  • Search Mode (Required) — controls match semantics (starts-with, contains, exact, etc.).
  • Javascript Callback Function — invoked when a result is selected. Function signature: myCallbackFunction1(type, fieldname, ID, action).