Limit ENUM showing in the list

Is it possible to shorten the selection of the enum list?

I’ve 2 tables and the Eng 1 is ref to Report table

I put Date column as Label. So the enum list shows all the dates instead of the report IDs in random numbers.

How to limit the enum selection of dates to 1 month? Thanks.

You could write it like…
SELECT(Report EL[REPORT ID],EOMONTH(TODAY(),0)=EOMONTH([DATE],0))
This will show you records from this month only.

5 Likes

I got an error “The expression is valid but its result type ‘List’ is not one of the expected types: Date” in REPORT EL table in formula row.
Also, I’ve changed the REPORT EL KEY type to date and all the tables ref to this KEY date. I used Date instead of random number because user has to use the app to record everyday. Not sure if this ok?

I believe Aleksi’s formula suggestion should go in the Valid_If field of your [REPORT ID] column in “Engine 1” table.

I’d suggest using a uniqueid() for the text-type key value, and keep the date separate.

Got it! Hope that there will not be a problem to use date for the key value as the records must have a date and also good to avoid having to many rows (365 days x 25 tables). Too many rows will slow down the sync, won’t it?

Hi Marc, I wonder why the dates are displaying randomly and not in order.

I created the dates from the backend excel sheet and then regenerate the structure to import the dates.

What do you mean by this? For me your dates seem to be in correct order.

2 Likes

I mean the dates should be sorted out by day and then month. The 1st day of the month should come first.

Your dropdown is already doing it with the format dd/mm/yyyy.

1 Like

First eight are from March and two latest are from April

1 Like

apologies for not being clear enough. I wasn’t able to screenshot the full enum for you to see. I want to sort each day (12 months) in numerical order. Screen below.

It turned out in order after refreshing the browser. I don’t know what trigger the change.

1 Like

Though you can use SORT() expression to show them in correct order.

1 Like

Hi Justin
I have had this happen with lists before. Sometimes they end up all out of order. It seems a bit random and I dont know why it happens. Possibly Aleksi sort solution would stop this happening. I haven’t tried it. Reloading the view seems to help.