Louay Ali
Posts: 0
Joined: Mon Nov 03, 2014 3:03 pm

Show new database entries first in the list

Hi,

I would like to know how to display the newest additions ( rows ) to the database the first thing in the list. To be acting like a stack not a queue.

Thanks.

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

Show new database entries first in the list

Hi Louay,

You need to use "sort" parameter with value "_updatedAt".
Details: http://prntscr.com/5gz868/direct

More details about sorting here: http://devcenter.appery.io/documentat...

Regards.

Louay Ali
Posts: 0
Joined: Mon Nov 03, 2014 3:03 pm

Show new database entries first in the list

Ok, that works fine if i am using the Test feature in the service itself.

How can i apply that on the database of the app itself ?

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

Show new database entries first in the list

Hi Loyay,

You need to:

  1. Add service datasource on the page.

  2. Click "Before send" mapping.

  3. In request "sort" put value "_updatedAt".

    Okay from this time when you will invoke this server datasource it will send this sort parameter.
    Details: http://prntscr.com/5jwqzh/direct

    Regards.

Louay Ali
Posts: 0
Joined: Mon Nov 03, 2014 3:03 pm

Show new database entries first in the list

Hi Yurii, Thanks for your help.

I did what you said, but it doesn't yet work. If i clicked : "Test" from inside the service, it works fine, but it doesnt work on the screen itself when the service is invoked on page show.

Any more help ?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Show new database entries first in the list

Hello!

1) If it doesn't work in the tester, then you have made a mistake somewhere in the mapping, or there was an error on the page
2) Could you please show us the mapping for your service?
3) Also please open the console before launching the service to see coming error.

Louay Ali
Posts: 0
Joined: Mon Nov 03, 2014 3:03 pm

Show new database entries first in the list

Hi,

There are no errors in the page. The Data is show but on the old format which is by default ascendingly. The new mapping ( descending order ) doesn't yet show on multiple devices even.

Image

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

Show new database entries first in the list

Hi Louay,

Your mapping seems to be correct.

Please show us your app public link and describe steps to reproduce this problem.

Regards.

Return to “Issues”