0

Sorting for a View Element

I have a relation field with multiple records in it and I display it via a view element. Now I want to have some dynamic sorting by name, or by a number, but with the sorting I dont have some luck. Here is the code without the sorting and prepared for it.

let ActiveRecords := (select 'Line-up' where Zeitaufzeichnung.'Aufzeichnungen Meldung' like "recordings");
let ActiveRecordsbyName := ActiveRecords.Name;
let ActiveRecordsbyAmount := ActiveRecords.'Erarbeiteter Wert';
let AZ := ActiveRecords;
let ZA := ActiveRecords;
let Amount_UP := ActiveRecords;
let Amount_DOWN := ActiveRecords;
let WorkingInIt := ActiveRecords;
switch 'Sortierung Produktion' do
case 1:
    AZ
case 2:
    ZA
case 3:
    Amount_UP
case 4:
    Amount_DOWN
default:
    WorkingInIt
end

5 replies

null
    • John_Halls
    • 2 hrs ago
    • Reported - view

    Hi  

    I am fairly certain that the sort order is defined in the view (where you say which columns to show and you are able to sort one of them ascending or descending, not in the script that creates it.

    Regards John

      • Michael_Blechinger.1
      • 2 hrs ago
      • Reported - view

       I was thinking maybe its possible to make the sorting also dynamic, like you see here on the screenshot, how I intended it to get working.

      otherwise, I need to create 4 different views to have this sorting I need. But it's much more effort to get it done, than coding it. 

    • John_Halls
    • 1 hr ago
    • Reported - view

     If it were me, I'd go with creating 4 views. You have done so much prep work anyway.

      • Michael_Blechinger.1
      • 1 hr ago
      • Reported - view

       okay, so I will do that. With Ninext 3 it's a fun to duplicate now everything. I forgot about this nice extension. :-)

    • John_Halls
    • 1 hr ago
    • Reported - view

    Of course, good luck!

Content aside

  • 1 hr agoLast active
  • 5Replies
  • 13Views
  • 2 Following