I have 3 Repeating Groups. Repeating Group 1 (RG 1) holds
I have 3 repeating groups. RG 1 working off an API Connector call to a remote SQL Database and loads records into RG 1. No issue.
RG 2 works off RG 1 but with a filter of a field called ‘Selected’=0. RG 3 works off RG 1 but with a filter of a field called ‘Selected’=1. Again, no problem.
I want the user to be able to click on a checkbox in RG2 to mark the records they want to move to RG 3. They then click a button to move the checked records from RG 2 to RG 3, all at once.
, and which calls out to the SQL database to change a field value called ‘selected’ for all the records they marked the checkbox for.
On the button click, I am calling an API Workflow that calls a SQL Connector routine, to change a field value on the records the user checked in RG2.
On the button click, I am calling an API Workflow using the ‘Schedule a workflow on a list’, as I want this to run based off a list of records to run this routine (that is created from the checkboxes the user clicked) against, realtime. O then have the RGs refresh, so they user can see the records moved between RG 2 and RG 3. However, scheduling a workflow on a list, poses an issue. The workflow from the button, calls the ’Schedule a workflow on a list’ using current date/time, but then also has steps after that to reload and redisplay the RGs. But the button workflow doesn’t wait for the Scheduled API call to finish, and I therefore get varying results, never a complete.
I saw a post from @mishav about exposing an API Workflow endpoint externally, and calling it via the API Connector, which would make the workflow wait for the API workflow to finish. Sounded like the right idea (really cool actually), but I don’t see how you can do this on a ‘list of things’ Am I missing something? Any other ideas on how I would accomplish what I describe above? Any help would be appreciated. Thanks!
Endpoint exposed as a public endpoint.
Endpoint parameter defined as a list of things, example:
Send a parameter containing a list of unique ids that match the things in the list. This can be urlencoded or json, whichever you find easier to create …
Example JSON:
Header: Content-Type = application/json
Body: {"carlist": ["1539743082399x160674618407649280","1539743091467x491910219481743400","1539743095248x467637998040383500"]}
Example urlencoded:
Header: Content-Type = application/x-www-form-urlencoded
Body: carlist[0]:1539743082399x160674618407649280&carlist[1]:1539743091467x491910219481743400&carlist[2]:1539743095248x467637998040383500
After getting it to work, turn authentication and privacy rules back on, and include a bearer API token in the call header.
Thanks. Could use some help calling Bubble Endpoint via the API Connector. I call other outside APIs passing the parameter in the URL. That all works fine. Not sure how to pass parameters using the PUT call to Bubble Endpoint via the API Connector. My API call:
If you’ve added and removed headers, likely the definition in the API connector has gotten invisibly corrupt and you need to create another one.
The endpoint can handle several types of parameters in the body, and to determine which type they are it relies on seeing a header called Content-Type. Your API call isn’t sending one, so it won’t know what to look for.