
Hi there!
I'm using Flutterflow to build my app and recently I discover AppWrite. I'm getting issues when trying to query document via Api call. When I use one query, it orks. But when i try to put two queries, the second is not recognized. I precise that I use the Flutterflow API Call editor. I use the variable "queries[]" with the value "lessThan("age", 33)". It works fine because there is only one query. But I don't know how to pass two queries. I've tried all I think possible. When I try variable "queries[]" with values "lessThan("age", 33)&orderAsc("nom")", it doesnt work. Only the first query works. I've tried changing brackets and quotation marks, nothing's working. Help please!

What response you're getting? What version of Appwrite is it?

Selfhosted version 1.3.8

Ohh I see
You'll need to pass multiple queries
Like so
queries[]=lessThan("age", 33)&queries[]=orderAsc("nom")

Check here for more details

Btw why are you sending the Api key in the request?

I know. But How can I do this in Flutterflow. When I write lessThan("age", 33)&queries[]=orderAsc("nom") in the qeries variable, only the first query is working. When I create a second variable to pass the second query, only the first works.

Try to multiple variables named queries[]

it cannot add two or more variables with the same name 😩

That's why I tried to add a second variable named &queries[], but it didn't work

Yes just tested and its looks like FlutterFlow limitation about using array as aquery parameter

It's really frustrating. Appwrite is so intuitive.

Do you know if it is possible to order data in a JSON local state? I would put the first query data in a local state and then order or filter the data in the local state if possible.

Are you talking about Flutter or FlutterFlow logic? As I'm not that familiar with the last one.

I was talking about Flutterflow. But if it is possible with flutter it would be possible with flutterflow even with custom code

Vote for appwrite in the wishlist section ( community forum)

fluterrflow might not let you have the same key multiple times so you can do queries[0]
and then queries[1]
, etc

I will try and inform you

Wow!!! It works fine! Thanks a lot!

SOLVED: Rest Api multiple queries in FlutterFlow
Recommended threads
- Relationships restricted to a max depth ...
When I do query like: ``` await _databases.listDocuments( databaseId: AppwriteConfig.DATABASE_ID, collectionId: AppwriteConfig.SERVICES_COLLECTI...
- How can we add more than 8 attributes in...
Hey, when I tried to add attribute in my collection it showed me this Error "The maximum number or size of attributes for this collection has been reached." How...
- implement caching
It it possible to cache response for few minutes? I dont want to create function or implement a whole reverse server just to cache it in somewhere ?
