Page 2 of 4

Sorting database results from a service

Posted: Fri Aug 01, 2014 6:58 pm
by Kateryna Grynko

Hi Alex,

You should use parameter "sort" with value "-_createdAt".


Sorting database results from a service

Posted: Sat Aug 02, 2014 3:24 am
by Alex GG

Hi, the problem is that I dont want to create a new build.

I need to do this without changing anythin within the app.

So, I need to know how the list service works, because as I said:

the first records created are shown on the top of the list, but the last record added is not at the end of the list service (is on 14th place of 20)...looks like at certain number the records are list on a random fashion.

Regards


Sorting database results from a service

Posted: Sat Aug 02, 2014 4:48 am
by Illya Stepanov

Hi Alex,

Could you please show us example of your database data and the result that your getting with list service?


Sorting database results from a service

Posted: Tue Aug 05, 2014 1:52 am
by kareem

Would like to get in contact with Alex


Sorting database results from a service

Posted: Tue Aug 05, 2014 2:00 am
by Alena Prykhodko

We don't obtain such information. You can stay tuned, probably Alex will reply.


Sorting database results from a service

Posted: Sat Oct 11, 2014 11:32 pm
by EJLD

Hi There,

I hv just run the builder update.
most of the app works except few stuff that you guys' support is working on kindly.

i hv just made a new simple query and don't get the expected result.

the "sort" with "-_createdAt" doesn't work, all show up in increasing order.

also, "limit" doesn't work either.

any trick with the new builder ?
thks for you guys' help as usual.

Eric


Sorting database results from a service

Posted: Mon Oct 13, 2014 10:13 pm
by Yurii Orishchuk

Hi Eric,

Please show us screen shots with request from browser debugger where we can see all request parameters.

Also i've tested it and it works well for me, details:

1 sort with "-_createdAt":
http://prntscr.com/4vxcs6/direct

2 limit:
http://prntscr.com/4vxd6o/direct

Regards.


Sorting database results from a service

Posted: Mon Oct 13, 2014 10:42 pm
by EJLD

Good morning Yurii,
thks for your msg, the great advice was "query string", I put mine under "where" in the header.
it works well.
i'll know from now on.
thks
Eric


Sorting database results from a service

Posted: Sun Mar 22, 2015 10:56 pm
by Ellen Schlechter

I have a regular sort working. One thing I am having trouble with is that I sort a string column in the database that contains both letters and numbers. So this is how it sorts it:

A1
A123
A133
A2
A223
B1
B123
B133
B2
B223

Is there a way that I can get it so sort it on the value of the whole number instead of just individual characters. Like this:

A1
A2
A123
A133
A223
B1
B2
B123
B133
B223


Sorting database results from a service

Posted: Tue Mar 24, 2015 1:52 pm
by Alena Prykhodko

Ellen,

This is how regular sort works. You need to use custom logic here.