Auto-populate Enum Values with existing data

If I’m building an app with existing data, I’d like the ability to auto-populate the Enum values in the column details (red circle in screenshot), from that existing data.

As it stands now, the system is smart enough to show existing values in the drop-down. However, if all records with a certain value are deleted, then that value will no longer show up in the drop-down, unless it was manually added to Values section in column details.

Status Open
2 18 2,638
18 Comments
Bahbus
New Member

Out of curiosity, why would you need the dropdown to still have these values if they were deleted?

Marc_Dillon
Platinum 1
Platinum 1

The records using the value was deleted, but I still want the value in the drop-down for future records.

Bahbus
New Member

Sounds like you should create a seperate table that stores these values that no one can delete (except for you of course).

GreenFlux
Gold 1
Gold 1

I have worked around this by creating a set of ‘Master’ records that are filtered out of the slices the user sees, and are only used to populate initial values.

I agree, this would be a lot easier if the EMUN values could be defined and stored with a lookup of existing values, rather than having to hit the (+) button and add each one manually.

Kirk_Masden
Gold 1
Gold 1

I would agree that enum can be improved. Personally, I find the need to use “Valid if” in “Validity” to be a little counterintuitive. Also, it can lead to an “invalid” error. I’d like to see validity and automatically generated enums separated.

Marc_Dillon
Platinum 1
Platinum 1

Totally agree.

Steve
Platinum 4
Platinum 4

How so?

How so?

LeventK
Silver 5
Silver 5

To populate or maintain ENUM content even from the deleted records needs somehow a cache container/memory which can eventually affect app’s sync time provided it’s possible to provide such kinda a feature. Via actions it’s always possible to copy some of the recorded data to another table so that it can be used as a data container for the ENUMs or possible dropdowns.

Marc_Dillon
Platinum 1
Platinum 1

Let me be more clear on exactly what feature I’m requesting here.

Given this data
2X_2_27e268c191d62e1ebe18fc261888554025169708.png
I want a button or something on this screen similar to this:
2X_1_11568a406f01ca14ad6934f8d0bee9b162b58cd6.png
Which will convert the previous screen, into this:

LeventK
Silver 5
Silver 5

@Marc_Dillon
Why would you need this kinda feature when you have the power of using Valid_if and/or Suggested_Values?

Kirk_Masden
Gold 1
Gold 1

Thanks for your response, @Steve.

In regard to why I have found "Valid if” in “Validity” to be a little counterintuitive, I’m referring to using “Valid if” to create an enum or enunlist. It works but making such a list and checking for validity or user inputted data strike me as two different tasks. That’s why it struck me as counterintuitive to use the “Valid if” slot to make a list.

In regard to how an error can be produced, the main issue I’ve had to deal with is what happens after a value that has been recorded via “Valid if” to an enumlist column is no longer available in the enumlist due to changes that have occurred in the data. In such instances the app shows the user an “Invalid” error. I avoid this by making an action to erase the value that is no longer relevant and with produce an error but the combination or “enum maker” and “validity checker” functions had made the app building process for complicated for me.

LeventK
Silver 5
Silver 5

@Kirk_Masden
In general, we prefer to use enum maker expressions in Suggested_Values provided we explicitly need a validity checker expression in Valid_if. Isn’t this working for you as well?

Kirk_Masden
Gold 1
Gold 1

Thanks, @LeventK! I don’t think I realized that this was possible. Thanks for telling me about it. I’ll check it out.

Marc_Dillon
Platinum 1
Platinum 1

Ease of use.

A self-referential formula in valid_if or suggested would fail under the same circumstance described in the original post (no record with a certain value exists). Sometimes you want/need a concrete and explicit list of possible values, and I want that to be created by the system instead of manual entry.

Kirk_Masden
Gold 1
Gold 1

I tried to use Suggested_Values and it worked but the presentation (appearance) was different. Functionally (including appearance and UX), can you do everything you can with Valid_if in Suggested_Values? Judging from the following explanation, they seem different: