Filtering API results

Hello,
I’m trying to filter an external API - if I filter by text, the filter works perfectly, but if I try to filter by a Magic Text (with exactly the same content), the filter doesn’t work.

Is the Magic Text adding extra characters into the query by any chance? Is there any way we can debug the output of that filter to see exactly what it’s doing?

Filtering by text:


This works.

Filtering by Magic Text:


This doesn’t.

Filtering entirely by Magic Text (where Magic Text in collection is same as the text above which works on its own):


This also doesn’t work.

Effectively, I can use a static filter, but not a dynamic one. Is this a bug?

Can you show us where you’re getting the magic text from?

Hello

I have the exaclty same issue. The API call seem’s not working with dynamc data inside the query.
I’m getting the dynamic data from the logged user.

Can you solve that bug? (if it is a bug) or at least give us a workaround?

Thank you so much

It Is possible that the call start before the dynamic data being populated?

@patunz Can you share a video of how you have that set up in your app?

Hi @Ben

This is my setup

I added a new field “ID” in the user database:
userdbID

Then I set up an API call with the user ID as a dynamic value:

Then, for test purpuse, I added a Text element to the same screen of the list with the same dynamic value:

query label

The results is that the ID is correctly show in the text label (I masked a bit for security reason), but below it supposed to be the list and instead I have a infinite loading circle:

But, if I manually put the same ID in the call query filter…

…the list works perfectly:

I’m stuck on that…

Thank you so much!

Hi @patunz I believe the reason this is happening is because the logged in user information has not yet loaded when we are making that API request.

We’ll have our team look at it, and see if we can make that work like it should.

Hi @jeremy thank you so much

Yes, it would be very useful (I didn’t find any other workaround to bypass this issue), so right now I’m stuck.
Hope you will find a way to solve!

Thank you again!

So I have a follow-up that may be related? Basically I have a filter that works on navigation to page… but not if I refresh that page.

My scenario also involves ‘logged in user’ info.

Here’s the scenario:
I’m filtering an Adalo collection/list (not external). The collection has a text record field for user emails. This is a text record, not a relationship field.

The filter on the list that works is "logged-in-user-email is equal to collection’s-user-email.

Works perfectly - navigate to this screen, all good. Results as expected.

BUT - if I refresh/reload that same page in the browser… not good. Totally different results, and not filtered by email.

Hope this is useful…

Thanks!

Just following up on this - my use case wasn’t involving logged in user info, but a category ID from a separate collection unrelated to a user.

@patunz is that list on your app’s home screen?

Hi @Ben
I tried to move from home screen to normal screen, but based on a fast test I did right now, It now seems to works in both kind of screen… don’t know if you made some fix

Hello Guys,

this bug still exist, in my case i do API filtering with the id of the connected user. And for having filtered data, i must go to another screen and wait for 2 3 seconds.

Can you help me on this please ?