Is there a way to have an enum list automatic...

(Tammi Canelli) #1

Is there a way to have an enum list automatically update based on certain criteria?

On our shelter registration form we have a drop down of the available shelters.

As the shelters fill up the team would like to either remove the shelter from the drop down or have the shelter name be updated to show:

Shelter Name

  • FULL not accepting evacuees (something like that).
(Suvrutt Gurjar) #2

This could be possible in depending on how your app structure is.

In case you are getting the Enumlist option by using Valid_if

from another table, you may wish to have another column called say “Shelter Status” which by default is with “Available” status as initial value.

When a shelter is full, the status becomes" Full"

by manual entry and again becomes “Available” depending on availability by manual entry by team.

This shelter status could also be tracked

by app logic, if corresponding fields say [Capacity] and {Present Occupancy] are tracked.

Now in the valid_if of Enumlist column of{Shelter Name], you may wish to enter the expression SELECT(Lookup Table[Shelter Name], [Shelter Status]=“Available”)

The Enumlist will show only those shelter names that are available.

(Tammi Canelli) #3

@Suvrutt_Gurjar you are a GENIUS!!!

Right now the shelter status update is manual, but my next challenge it figure out how to automate it using the app logic - just can’t figure out how at the moment since that piece is coming from a completely different app (for staff only) and the one with the form and enum list is the public app - but this is a great start!

Is there a way to sort the enum list alphabetically?

(Suvrutt Gurjar) #4

@Tammi_Canelli, To sort the enum column alphabetically please use SORT function as

SORT(SELECT(Lookup Table[Shelter Name], [Shelter Status]=“Available”))

Hope this helps.