Database query with Supabase doesn't send correctly until 2nd attempt

Hi,

New to learning the dark art of Flutterflow.

I am using Supabase as my backend.

Scenario is a user enters a code to "match" with another user. So have a backend query that searches for the user with the code entered into an input. When the "add" button is clicked, the backend query is refreshed taking in that value, subsequent action is to insert a row in a table with the matched user.

The issue I am encountering is that upon first attempt, the "added user" comes back as null in Supabase. However if I click the button again, then it works upon this second attempt. Using devtools, I can see that the backend query returns the correct user on the first attempt (i.e the query is successful), but for some reason this value is not passed to the "insert row" action. But again, if I repeat the button click, then it completes successfully.

I have tried adding in delays in various portions of the workflow to no avail. The refresh backend query is set to await a response before proceeding anyway. But still the problem persists. And I'm out of ideas at this point.

TIA

3
9 replies