Vehicle Data API

I am using a vehicle data API so when a reg is searched it will return info such as make and model of the vehicle.

I only want the API to run when the search button is clicked in group 1, this then sends that API data to group 2 where it will display the results for the user to confirm etc. The issue I’m having is i think the API call is running after each letter is typed as a pose to when i click search. I tried to setup a workflow to send the reg from step 1 to the reg box in step 2 where the API call is then made however because the group type in step 2 is API call it will not allow me to send a text format to this group.

Can anyone recommend a solution where the API call is only ran once (so i don’t get charged for a call on every key stroke) and the data is then displayed in the next group when i click the search icon.

Your call parameters are likely dynamic and set to the inputs value. You do not show in your screen shots how the call is structed in the repeating group, but that is my assumption as to why it changes when each letter is typed. Try finding a way to make it so you use a custom state for the call parameter and set that state using the button.

ok thanks,

so i would maybe set a state for the group (reg search Yes/No) and then when the stats is NO set the data source to something other than the API call or leave blank. then When the stats is Yes set the data source to the API call. Then the Search icon would change the state - does this sound correct?

See current data source setup below. so i have set the reg parameter to be the Reg box inputs value.

No, I would make it so the state is holding the value the user enters from the input and the param for the api call is the custom state value. You can optionally also add (probably good for UX) a conditional on the repeating group to not be visible unless the custom state is not empty.

1 Like

managed to figure it out - thanks again

1 Like