See images below. I have an ‘Input’ that takes a ‘postcode’ and delivers back possible address results (please ignore the formatting of how they are returned) ‘as soon as’ the user starts typing their postcode in the input by calling a Geocoding API.
Note the ‘Search by Postcode’ button does absolutely nothing at the moment, but what I’d like to know, is if there’s a way for the API ‘not’ to be called until the button is pressed?
Yes, use a regular input (you should also set it to “this input shouldn’t be empty”) and rather than trigger your workflow “when that input’s value is changed”, trigger it on whatever button click you want.
I’m still having a few issues on understanding this.
I think I’m just confused as to how to prevent the Repeating Group from auto-calling in the API. Should I be removing the Data Source from the Repeating Group?
Set your API call up as an Action, rather than Data, then use a workflow action when the button is clicked to make the API call and set the data in the RG.
Many thanks to @keith and @adamhholmes for their input on this, the final piece in the jigsaw was understanding when setting up an API that the ‘Use as’ dropdown is incredibly important, where you can set the API to be used as ‘Data’ or an ‘Action’.
For those of you in the same pickle as me (I was close to taking myself in the garden and shooting myself ), once you’ve set the API up as an ‘Action’ you can then easily use a ‘Workflow’ on the button when it is clicked to call an API (see ‘Plugins’ in ‘Click here to add action’ in ‘Workflow’ section). Once you’ve called it, you can then add a second step in the Workflow to display the results of Step 1 (’ Result of step 1…’ set in the Data Source). I’ve added some images below just to help as I’m not the best at explaining.