API runs search before waiting for input value

Hello. I have set up an API that does seem to connect to the data but I think I am missing something critical when it comes to using it.

I have the following API set up in the API connector:


API info was found here: http://doc.openalpr.com/api/?api=cloudstream&urls.primaryName=cloudstream

When I initialize the call, I get this so it all seems to be working:

Next on to designing the basic page. I have set up an Input Field A and a repeating Group. The idea behind this is to search for results based on Input A’s value and display them in fields of the repeating group.

But that does not seem to work. When I load my test page I immediately get results (Instead of waiting for Input A’s value). And when I change Input A’s value, there is no change in the data displayed.

Appreciate any help!

Hey @crathbun — not sure if this is the solution, but have you tried setting the “Use as” dropdown as an Action vs Data?

1 Like

Trying using a button here.
In repeating group’s properties untick the property “visible on page load”.
When the user click on this button, show the repeating group.

When I change the API to Action instead of data:

I then can no longer use the API in the repeating group.

Adding the button would work if indeed the data would change with the input data. But tried it and no luck. The repeating group does show after the button but makes no difference in the search.

Try removing 1 from the value in the plugin section. Then, this will not send 1 as a default value.

Additional information: When you change it from data to action and initialise the call, go to workflow of the button Clicked and under plugins you will be able to see the OpnalrAPI - plate search. Then you can add one more action to store the result in custom states or in database.

Thanks. So removing the 1 from the value did solve the values not coming up on page load. However, once I put in a value into the input field, the repeating group displays all the recent plates anyway, instead of just the one in the input value…

Seems I am close but misunderstanding something key.

If you want search results only when the input has a value, then remove the Data source from the Appearance panel and use a Conditional instead. Neither a button nor workflow is needed.

Alternatively, if additional logic is needed, you could implement a workflow to populate the RG when the input value changes.

-Steve


Premium Bubble Plug-Ins

Thanks for the reply. I must have something wrong with the API though as no search occurs when Input A is changed…

Depending on the connection and the server, there could be a lag before the data appears. If that’s not it, screenshots of your workflow would be helpful. Otherwise, it’s just a guessing game.

-Steve