Group by location (name and not ID) in a View ordered

GV
Bronze 3
Bronze 3

Hi everyone,

I am trying to group by location, a table with an ID and a Name (Living Room). Name is my label.

 

Capture d’écran 2023-01-03 à 15.41.24.png

When in a specific view, I am trying to group by Location ascending

Capture d’écran 2023-01-03 à 15.44.56.png

 but unfortunately it orders the ID of the table and not the label.

How could I fix this ?

Thanks

 

Solved Solved
0 12 333
  • UX
3 ACCEPTED SOLUTIONS

So as well as grouping you probably need to specify a sort order in the view.

View solution in original post

Is emplacement a Ref column?

View solution in original post

Good point.  Well you can't order by an ENUMLIST anyway I think 😆

View solution in original post

12 REPLIES 12

So as well as grouping you probably need to specify a sort order in the view.

GV
Bronze 3
Bronze 3

I did actually put a sort order by "emplacement" which is location.

But unfortunately it orders by Location ID and Name's ID.

 

Do you have any ideas how to solve this ? 

 

Thanks

Is emplacement a Ref column?

Sorry I accepted as solution

Emplacement is an enum list column with a base type ref from Emplacement table

Capture d’écran 2023-01-05 à 15.03.25.png

Capture d’écran 2023-01-05 à 15.03.30.png

So Ref columns behave a bit differently to other column types.  With a Ref column in the table your in your actually selecting, you are choosing the KEY column from the other table.  But to make it look nice in the App, visually it's showing you the LABEL column.  So when you choose Order By a Ref column it will order by the KEY and not the LABEL.

Luckily, there is an easy fix.  Simply create another column with a formula of [RefTableName].[DisplayColumn], make this hidden but use it as the sort column.

Hi 

Thanks for your prompt reply.

[RefTableName].[DisplayColumn]

I am not sure it's working as my "emplacement field" (ID / Label : Location) is an enum list..

Capture d’écran 2023-01-05 à 17.19.57.png

 

 

Good point.  Well you can't order by an ENUMLIST anyway I think 😆

Steve
Platinum 4
Platinum 4

@1minManager wrote:

Well you can't order by an ENUMLIST anyway I think


Sure you can! In fact, one of the primary features of an Enum or EnumList column is that you get to set the sort order of the defined values.

Thanks Steve.

And how it could work in that case ?

Thanks

Envoyé de mon iPhone

Not sure you've got the right idea here.  AFAIK he's got a list of items in a Table view and he's trying to order those items by the value of an ENUMLIST.  Given that an ENUMLIST is muliple items, in a specific order, I'm not sure how ordering would work.  Or even if Appsheet allows that.  If it does, I'd almost guarrantee its not what he's after...

Steve
Platinum 4
Platinum 4

@GV wrote:

Emplacement is an enum list column with a base type ref from Emplacement table


Can a single thing have multiple locations? If yes, sorting by location makes no sense; if no, it should be Enum rather than EnumList.

A single list can have multiple locations yes, I'll try the enum rather than enum list

Top Labels in this Space