Set up expression to sort Enum column.

Hello,

I have a column I'd like to automatically sort (currently having to do this manually).

I have created a job status app showing what status are techs are at (Pending, Booked, Not Completed, Completed, Invoiced, Archive). This works well however when we open the app the job status is random and I'd like to list in the following order;

Table: Jobs

Column: Job Status

List in this Order: (These we created using 'Type Details - Values' in the Job Status ENUM)

  • Pending
  • Booked
  • Not Completed
  • Completed
  • Invoiced
  • Archived

I've tried to sort but wondering if its because it's an ENUM list? 

Also, should this expression go in 'App Formula'? 

Thank you

Annie

0 2 60
2 REPLIES 2


@AnnieJean007 wrote:

This works well however when we open the app the job status is random


You may want to mention where you find this random order, in the summary view (such as table, deck) the records are displayed in the random order or the status appears in the [Job Status] column in the random order when the user is filling in the form?

 

One way you can do this is to create a VC that evaluates to the sort order you want

something like

SWITCH (
 [Job Status],
 "Pending", 1,
 "Booked", 2,
 ...
) 

and sort your view on this VC.

Top Labels in this Space