For App Connect to sort need to be query values? Or can be direct values. I am trying like this.
on code look like this
<dmx-serverconnect id="propList" url="/dmxConnect/api/propList.php" dmx-param:sort="id" dmx-param:dir="'desc'"></dmx-serverconnect>
But on the execution the order is not changed at all.
I want to sort on page load.
Teodor
March 8, 2024, 10:56am
2
You need to enter the id
and desc
as strings. On your screenshot the id
is not entered as a string (not typed in the input) but some dynamic value is added. Just type id
by hand in the Sort field.
Also, why not just sort in the server action / query?
I have tried in a lot of ways
<dmx-serverconnect id="locationList" url="/dmxConnect/api/admin/locationList.php" dmx-param:sort="'id'" dmx-param:dir="'asc'"></dmx-serverconnect>
The problem on server connect is that in other pages I need a different order.
Prior posting here I have tried like string, as Dynamic, etc, etc and no results
Teodor
March 8, 2024, 11:00am
4
Do you have any sorting set in the database query options?
Teodor
March 8, 2024, 11:04am
6
when the page loads in your browser, do you see the sort and dir params properly sent with the server action call?
Yes but seems to not recognize it
weird
Teodor
March 8, 2024, 11:16am
8
Have you changed the Sort and Direction properties in the server connect / query properties then?
Not at all
Even here in server connect is not recognizing.
Look here direct on server connect still the same.
I create a new server action for testing and still the same. Dont change the order.
Teodor
March 8, 2024, 11:22am
12
Is this happening only when you have a database query with joins? Is this working fine with just one table added?
The testing is only one table
TomD
March 8, 2024, 11:25am
14
You haven’t added any conditions on the sort tab, eg:
This I think is when you have conditions. If you want to use the basic ASC and DESC via one field you can use the default ones. Am I right @Teodor ??
Teodor
March 8, 2024, 11:33am
16
What server model and what database are you using?
PHP for this project.
Wappler 6.3.2 Beta channel
Teodor
March 8, 2024, 11:38am
18
What database are you using?
Mysql local server with Mamp
Teodor
March 8, 2024, 11:40am
20
Chackmool:
I just saw this - please add the columns you need here, don’t use *
as sorting won’t work if no columns are added to the query builder…
2 Likes