Team Kode
 · AI-powered software agency

IF/Then/Else conditional does not work as expected

Troubleshooting

The conditional IF/ELSE/THEN on actions, doesn't work on the front-end, the action does not occurs

What have you tried so far?

I have a system that needs to perform a series of OR filters on the database. The client requested that these filters be built on the front end, as implementing them on Supabase could cause issues with multiple requests. To address this, I created an APIGet call to the database within a "low-code" framework.

The idea was to create numerous variables in PostgreRest that, when null, would be excluded from the URL results. This approach worked in the API environment.

However, the FlutterFlow front end always presents some issues not explained in the documentation or logic. To integrate the call on the front end, I used the following logic:

A series of IF/Then conditions that check if an input is empty. Depending on the filter's position in the URL, it adds the '&' symbol accordingly for PostgreREST. However, this action does not run as expected. I added a page state to check the URL format and an update page on the button outside the API, but only the page state update works.

Since the action does not run as the "low-code" approach suggests, does anyone have an alternative solution? Perhaps a custom action to formulate the API call would work, but I'm unsure how to link a page state to a custom action. Working with FlutterFlow on professional demands without knowing Dart is very challenging.

Did you check FlutterFlow's Documentation for this topic?
Yes
1 reply