Giorgi625 VIP
Total posts: 655
14 Jan 2016 14:41

Is there possibility to somehow sort records which are shown via relation field by field date&time ? for example I display on Actors page movies where he plays and in that movies I have release date by date&time field and want to sort records by date from this field.

Last Modified: 20 Jan 2016


Giorgi625 VIP
Total posts: 655
14 Jan 2016 14:43

I just got one Idea, how I remember date&time field has override option for creation and expire time so if I will use creation dates override and then in relation field will sort items by creation date will it be overriden by date used in date&time field?


Sergey
Total posts: 13,748
15 Jan 2016 10:32

Right.


Giorgi625 VIP
Total posts: 655
19 Jan 2016 19:26

I have added realated articles via realation field. Record is about Director and relation field is : Movies of this Director, I have chosen in release date of movies(to override creation date) and have chosen in sorting of related items but it sorts records via default created date not release date. Do I need to write something in input field with label: Ctime modification value ?


pepperstreet VIP
Total posts: 3,837
20 Jan 2016 00:20

Giorgi625 Do I need to write something in input field with label: Ctime modification value ?

Actually no. You want to replace it with your exact date input.
The additional parameter is only for further modification i.e. add or substract a certain amount of time.


Did you check the dates in your records? Are they really overriden?
Did you have older movie records before the overide feature has been activated? Then re-open and save them again.


BTW, there are 2 sorting parameters in Relation fields. Don't confuse them:

  • One is for submission form. Ordering does apply to checkbox/select style only.
    mj_cobalt_fields_relation_form_control_sorting

  • Second is for List/Full view incl. template override.
    In your case, you might set the sorting order to Oldest first or Most Recent first

Example with Movie as Parent:

mj_cobalt_fields_relation_multiple_parents

mj_cobalt_fields_relation_multiple_parents1

... with changed sorting order:

mj_cobalt_fields_relation_multiple_parents2


Giorgi625 VIP
Total posts: 655
20 Jan 2016 14:15

pepperstreet Actually no. You want to replace it with your exact date input.

The additional parameter is only for further modification i.e. add or substract a certain amount of time.


Did you check the dates in your records? Are they really overriden?

Did you have older movie records before the overide feature has been activated? Then re-open and save them again.


thanks Pepperstreet, it was not overriden so I need to edit and save movies and it will be sorted as I need.

Powered by Cobalt