Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] How to change sorting to DESC by ID

[FIXED] How to change sorting to DESC by ID 02 Jun 2012 18:33 #2472

  • dares
  • dares's Avatar
  • Offline
  • Junior Member
  • Posts: 37
  • Thank you received: 4
  • Karma: 2
Hi,

Is it possible to change sorting of the records to "ORDER BY ID DESC" by default within the project? I need to view data in order "latest first".

I have created collection view and ID included in the table. On ID I checked "Sortable". In sanbox is not possible to change order of records clicking on ID (not possible to click on it).
73,
Miro

Cook saves your time and make your life easier.
Last Edit: 05 Jun 2012 07:12 by dares.
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 08 Jun 2012 13:17 #2523

  • dares
  • dares's Avatar
  • Offline
  • Junior Member
  • Posts: 37
  • Thank you received: 4
  • Karma: 2
It is probably not possible to achieve this within the Cook. Manual adjustment of php file will fix this. This topic can be closed.
73,
Miro

Cook saves your time and make your life easier.
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 09 Jun 2012 06:41 #2525

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
  • Karma: 22
Of course you can !

Just write a little bit code in the buildQueryOrderBy() function
The administrator has disabled public write access.
The following user(s) said Thank You: dares

Re: How to change sorting to DESC by ID 09 Jun 2012 09:17 #2526

  • dares
  • dares's Avatar
  • Offline
  • Junior Member
  • Posts: 37
  • Thank you received: 4
  • Karma: 2
Yes, but I thought that there was an option within the Cook for this.
73,
Miro

Cook saves your time and make your life easier.
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 09 Jun 2012 13:48 #2527

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
  • Karma: 22
Not possible, IDs are in a hidden status for us ...
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 09 Jun 2012 20:18 #2528

  • dares
  • dares's Avatar
  • Offline
  • Junior Member
  • Posts: 37
  • Thank you received: 4
  • Karma: 2
They are hidden only in tables. When you create collection view you can select ID to be a part of your table. Also you can select "sortable" in properties of ID but without effect. So this could be a bug within the Cook.
73,
Miro

Cook saves your time and make your life easier.
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 10 Jun 2012 07:05 #2529

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
  • Karma: 22
pa4rm wrote:
...When you create collection view you can select ID to be a part of your table. Also you can select "sortable" in properties of ID but without effect. So this could be a bug within the Cook.

I don't know this option! how can you drag&drop a field you see in the table, in the collection layout ???
Last Edit: 10 Jun 2012 07:07 by liubov.
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 10 Jun 2012 08:54 #2530

  • dares
  • dares's Avatar
  • Offline
  • Junior Member
  • Posts: 37
  • Thank you received: 4
  • Karma: 2
Go to your collection layout. Click on "fields". Drag your table name (in this example named cities) and drop it in the grid. You get ID field in your grid. Also is it possible to turn "sortable" on, but it has no effect. That is what I mean it could be a bug within the Cook.
73,
Miro

Cook saves your time and make your life easier.
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 11 Jun 2012 17:30 #2539

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
pa4rm : Good Avatar ! Nice spirit. Thank you.

In facts there was a bug.

Fixed now.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 11 Jun 2012 18:32 #2540

  • dares
  • dares's Avatar
  • Offline
  • Junior Member
  • Posts: 37
  • Thank you received: 4
  • Karma: 2
admin wrote:
pa4rm : Good Avatar ! Nice spirit. Thank you.

In facts there was a bug.

Fixed now.

Tnx. and also tnx for nice software. Keep doing great job
73,
Miro

Cook saves your time and make your life easier.
Last Edit: 11 Jun 2012 18:35 by dares.
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 02 Jul 2012 17:46 #2733

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
admin wrote:
pa4rm : Good Avatar ! Nice spirit. Thank you.

In facts there was a bug.

Fixed now.

Is there any changes that this bug is present again?

Thank you so much in advance!!
The administrator has disabled public write access.

Re: How to change sorting to DESC by ID 02 Jul 2012 18:52 #2738

  • dares
  • dares's Avatar
  • Offline
  • Junior Member
  • Posts: 37
  • Thank you received: 4
  • Karma: 2
Just tested and it works fine.
73,
Miro

Cook saves your time and make your life easier.
The administrator has disabled public write access.
The following user(s) said Thank You: tr4ding
Time to create page: 0.073 seconds

Get Started