Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Sorting database results from a service

Hi Alex,

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

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

Sorting database results from a service

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Sorting database results from a service

Hi Alex,

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

kareem
Posts: 0
Joined: Sat Aug 02, 2014 8:28 pm

Sorting database results from a service

Would like to get in contact with Alex

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Sorting database results from a service

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

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Sorting database results from a service

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Sorting database results from a service

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.

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Sorting database results from a service

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

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Sorting database results from a service

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Sorting database results from a service

Ellen,

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

Return to “Issues”