When grouping records, be able to sort by summary fields

When grouping records, we should be able to sort the groups by those little “summary fields” instead of ONLY being able to sort by the grouped field itself.

In other words, we could group our records by PROJECT NAME, but then sort the groups based on whichever group has the “newest date” or whichever group has the “highest total dollar amount” or whichever group has the “largest number of projects” or whatever.

We can already choose all of these options by clicking on those little “summary fields” which appear in the group headers — but we’re not able to sort on those “summary fields”. So we’re allowed to display these “summary” options onscreen, but we’re not allowed to sort by them.

3 Likes

Agreed. I have a situation where I have records grouped by Project Name, but would like these groups sorted by a different record associated with each project (in my case, “date started”.) This way my most recently started project is at the top of the list. Alphabetical sorting doesn’t help me.

2 Likes

Michael I found your original post where you described your workaround, but wasn’t able to reply there as it has been closed off.

I also have this issue and would love to be able to solve the way you did, would you mind answering a few questions? CAUTION: I am a noob.

so I have a base and would like to group the data by ‘patient phone number’ and then sort by ‘date of procedure’.

Can you suggest how i could replicate your approach using these fields?

many thanks in advance,
zac

Hi Zac,

Shoot. I had typed out the solution (below) then realized it won’t work for you. Maybe somebody else can chime in? My work around works for me because I was sorting by a single date (start date) associated with each project whereas you want to sort by multiple dates associated with a single phone number. My solution would just group every record individually for you - not much of a group then, is it? Well, here’s what I did, maybe it’ll give you some ideas:


Basically what you need to do is to create a formula field to create text that spits out the response “[date of procedure] + [patient phone number]”. This field then becomes the field that you group by and will be sorted by date. The down side is then you have to see the date of procedure in each record. But at least it works.

So your formula field (may be different if I get your field label wrong) would be

{procedure date} & “-” & {patient mobile number}

That would output (for example) “2020-07-14 - (040) 168-7901” for entry #2.

1 Like

thanks @Michael_Morris2! I think that would work actually, because even though there are multiple entries for each phone number, the procedure date remains constant (this is because we poll the patient on their pain levels multiple times following the procedure).

so my desired outcome is that the records are grouped by phone number and that those groups are sorted by procedure date.

I’ll try this!

ahhhh OK, now I see what you mean. yes, it does create a group of single records. bugger. not sure where i go from here.

Hi,

I have the same issue. I have projects with one or more products on there (grouped by project) and would like to sort by project which has the highest dollar amount sum.

Is there any way to do it?