Token Autocomplete: Pulling Data from a Remote API
Enterprise Plus Feature
When using the Token Autocomplete Field, Enterprise Plus subscribers can elect to use an External Data Source and pull records from ANY external API and filter as the user types.
When setting up the Token Autocomplete field select "External" on the first screen:
Writing the Integration Code
Next, you'll be able to open the NodeJS Javascript Editor console. The console is based on our Webhook module and supports the same syntax to include form field values and make remote calls to external APIs like SalesForce, Asana, Zen Desk, and any other remote source. If you need a node library added, please contact your account manager, and we can install the node package that would facilitate interaction with the API.
Shown below is an actual working example of pulling a list of users from Asana:
Read the syntax docs here to understand how to connect to 3rd parties.
Returning Data
When returning data, the format data is returned in is very important and must be matched exactly to avoid errors. The format is shown below. Additionally, the variable term can
var myarray = [
{
label:'bob@logiforms.com',
data:'Bob Jones'
}
,
{
label:'bobby@logiforms.com',
data:'Bobby Lee'
}
]
return myarray
0 Comments