Sorting by status and date at the same time?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stayfi
    Member
    • Jul 2021
    • 60

    Sorting by status and date at the same time?

    Hello,
    is it possible to sort by status and date at the same time?
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1603

    #2
    In Layout Manager of your entity define a search filter for the fields you want to output. In the entity you can stack the filters, use more than one filter at once.

    Comment

    • stayfi
      Member
      • Jul 2021
      • 60

      #3
      thanks shalma, will try

      Comment


      • item
        item commented
        Editing a comment
        Hi,
        do you need sort by user request or by default on listView ?

        i think, to test : in entityDefs, search on bottom of file : orderBy

        and put something so : [ [ "status", "asc" ], [ "date", "desc" ] ]

        to try .. but certainly work but this is then defaut orderby
    • stayfi
      Member
      • Jul 2021
      • 60

      #4
      Hi item, indeed i want to sort by default on listview, where's the "orderBy" located in entitydefs?

      any image to have an idea?
      Last edited by stayfi; 03-12-2023, 10:00 AM.

      Comment

      • item
        Active Community Member
        • Mar 2017
        • 1476

        #5
        Hi,
        i have never try !



        you must go in custom/ressources/metadata/entitydefs/your entity.json
        remove maybe line “order”

        but make a backup of json before test, after in admin, clear cache rebuild.. if don’t work.. re-put old file.
        if work.. post result

        else you can try :

        Hello, Does anyone know how to specify OrderBy as a list ? For example, on the backend one can do: $this->entityManager ->getRDBRepository('MyEntity') ->getRelation($entity, 'children') ->order('LIST:machineStatus:IN_USE,STORED_INOPERABLE,TRANSFERRED_SOLD,DISPOSED') ->find();​ but how does one do something
        Last edited by item; 03-12-2023, 11:03 AM.
        If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

        Comment

        • stayfi
          Member
          • Jul 2021
          • 60

          #6
          mm seems i should dive into the files, but since i'm not the admin, and i get error access, i'll try to forward my question to the manager, thanks again item

          Comment


          • item
            item commented
            Editing a comment
            sorry stayfi,
            just tested on last 7.3.4 .. not work.
            then only way is by coding
        • stayfi
          Member
          • Jul 2021
          • 60

          #7
          mm bummer, hope the dev team will implement it in the UI for easy access

          Comment

          • esforim
            Active Community Member
            • Jan 2020
            • 2204

            #8
            Just to help with searches, this would be: multi-sort, or multiple-sorting, multiple column sorting

            Comment

            • stayfi
              Member
              • Jul 2021
              • 60

              #9
              Originally posted by espcrm
              Just to help with searches, this would be: multi-sort, or multiple-sorting, multiple column sorting
              is this an option? or you're suggesting a feature?

              Comment


              • esforim
                esforim commented
                Editing a comment
                It just for forum searching in the future. I should have add an "off-topic".
            • deepsinghal29@gmail.com
              Junior Member
              • Jan 2024
              • 26

              #10
              I want task on my sidebar to be sorted by status. I have updated the Deault Order field on Task entity to Status, but it still sorts on date.
              Attached Files

              Comment

              Working...