I’m new to Adalo so thanks in advance for any assistance.
Quick question on external connections - how do I go about setting up an external collection where the API has a mandatory query parameter but the parameter I want to pass in is dynamic based on the user’s selection?
I realise that I can use the ‘filter’ mechanism to pass in a parameter at the time of using the collection - so that’s good. The problem I’m running into is that Adalo does not let me add an external collection that fails the ‘test’ step and as the API endpoint requires the parameter, it will fail if it’s not passed in.
I’ve come up with a workaround, which is to create fields in the User collection which I update with the user’s selection. Not ideal, but does work.
Is there a better way to do this that I’m missing?
Example below:
Date is a mandatory parameter. I’d like to not pass it in when setting up the collection, and instead pass it in when the user selects a date (i.e. as a filter parameter).
To set up the collection, you need to get at “success response”. You can set an sample date by clicking on the pen right to the “User selected date”, set a sample date, run tests, and have the collection created.
Also, did you try just to omit the date part from the API Base URL, and use date filtering later in “Query” field, after the collection is set up?
You can set an sample date by clicking on the pen right to the “User selected date”, set a sample date, run tests, and have the collection created.
Yes, that’s what I’ve done to get this workaround working. But storing a transient variable in the database (and updating it every time the user chooses another date) doesn’t seem like the best solution.
Also, did you try just to omit the date part from the API Base URL, and use date filtering later in “Query” field, after the collection is set up?
Yes, that’s what I want to do. But it doesn’t work because the API endpoint requires a date to return a “success response”, so I can’t save the collection.