Sorting in groupby

Greetings, community members!

I am seeking assistance on a matter regarding the possibility of implementing an alternative sorting mechanism for the "groupby" operation. Specifically, I am interested in arranging the grouped data based on their respective priority levels, as follows:

  1. Low
  2. Normal
  3. High
  4. Urgent

Screenshot 2023-07-17 at 6.26.41 PM.png

Screenshot 2023-07-17 at 6.36.47 PM.png

I attempted to approach the task from a distinct perspective, employing numerical representation, but the result appears aesthetically unappealing. I kindly request any recommendations or suggestions for improvement in order to enhance its overall presentation. Thank you in advance for your valuable input.

Solved Solved
0 16 440
  • UX
1 ACCEPTED SOLUTION

High --> Quite Urgent, Urgent --> Top Urgent?

View solution in original post

16 REPLIES 16

If understanding of your requirement is correct, I would assign the prorities in an enum column with order of options in enum column as 

Low

Normal 

High 

Urgent 

Then I would group the view by this enum column.

Yes its setup like that.

Screenshot 2023-07-17 at 7.06.15 PM.pngScreenshot 2023-07-17 at 7.08.24 PM.png

Screenshot 2023-07-17 at 7.06.29 PM.png

 

 

 

 


@Rifad wrote:

Screenshot 2023-07-17 at 6.26.41 PM.png


 

You can notice its Urgent, Normal, Low High but it should be Urgent, High, Normal, Low

Yes, I got it. So to group it in the desired order, the column having category option , I would set the enum options in the column settings in the order 

Urgent

High

Normal 

Low

and then use that column as group by column.

It's a common business practice to assign numbers for priorities; to avoid confusion and misconceived interpretations. For example, I wouldn't know for certain, which of "Urgent" and "High" has the highest priority.  So, I would name them like:

  • Priority 0 - Top Urgent
  • Priority 1 - High
  • Priority 2 - Normal
  • Priority 3 - Low

Or something like it. Here, you wouldn't miss on aesthetics and you would also give your users clear indications about what task has a higher priority than another. 

Also,


@Suvrutt_Gurjar wrote:

I would assign the prorities in an enum column with order of options in enum column


I believe our friend was talking about adding the values in the column definition, not the data source.

@Suvrutt_Gurjar 

Did you mean like this ? I tried this and did not work.

Screenshot 2023-07-17 at 7.26.18 PM.png


@Joseph_Seddik wrote:

For example, I wouldn't know for certain, which of "Urgent" and "High" has the highest priority.  So, I would name them like:

  • Priority 0 - Top Urgent
  • Priority 1 - High
  • Priority 2 - Normal
  • Priority 3 - Low

 

Thanks @Joseph_Seddik for reply.

As per this it looks ok but is there any way other than this to avoid this numbering ?

Other than @Suvrutt_Gurjar's suggestion, none that I know of. I'm sorry.

But really, we already have sorting options to set, so it is useless to be forced to set a sort based on the grouping should we define one. Sorting and grouping should be two separate settings.

 

High --> Quite Urgent, Urgent --> Top Urgent?

I had to do something like this to avoid numbering for now considering no other options. Thanks @Joseph_Seddik & @Suvrutt_Gurjar 

FYI, enum option sorting order does not work when using Ref values to another table. I had a support ticket submitted on this a long time ago, before the support switchover. Aleksi had even responded agreeing that it should work in that case and saying that they were working on it. But nothing ever came of it.

Yes you are right. I checked and it did not work. I thought its an intended behaviour.

Hi @Rifad ,

Sorry for reverting a bit late on this. I was testing some alternatives. As Marc rightly guided, I realized after posting that the enum proposal may not work in this case. Very sorry about my bad. I typically post such critical suggestions after testing. In this rare case, I missed it.

The following approach may or may not be useful to you because your requirement could be still very specific. But it could help someone else looking for a similar implementation.

The example below has Products table with products being accorded a priority from a 4 rows Categories table as a referenced  or parent table. So the various product records become children records of the Category table.

Then one could display the Category table with summary view as Card type view. The Card view allows related children records ( Products records in this case)  to be displayed in place of image placeholder. So the below collection or summary view displays the related Product records in the desired order of Urgent, High, Normal and Low

Categories summary card type view:

This view is sorted by ID of the Category table in ascending order. So it displays in the order Urgent, High, Normal, Low

Suvrutt_Gurjar_0-1689751758679.png

Categories view included as a view in dashboard view:

Suvrutt_Gurjar_1-1689751908095.png

Categories table:

Suvrutt_Gurjar_2-1689751948230.png

Products Table:

With Category table as reference.

Suvrutt_Gurjar_3-1689752110069.png

 

Category table:

Suvrutt_Gurjar_4-1689752182262.png

 

 

 

 

 

 

 

Thanks @Suvrutt_Gurjar

splitting into different sections wonโ€™t be a good idea for me currently. I have multiple dashboards like purchase, jobs, quote, sales I mean the entire app modules utilising single table for comments like screenshots i shared above. In this scenario management of these is literally x4 that is not practical. If it was for just one dashboard this works.

Thanks as always for providing me your valuable informations.

You are welcome.

Screenshot 2023-07-22 at 8.34.28 PM.png

Here comes another challenge. This is sorting as per status ref key not as per the label. How do I fix this ?

Top Labels in this Space