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.

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

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

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


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.

1 Like

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.

Totally agree.

1 Like

How so?

How so?

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.


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

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

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

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.

1 Like

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?

1 Like

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

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.

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:

Suggested values are basically the equivalent to defining a few via hardcoding and allowing other values turned on. Whereas Valid If is with allowing other values turned off. Otherwise they basically function the same.

1 Like

Thanks! So I think it’s fair to say that, since the two are not equivalent, there may be situations in which it is necessary to use Valid_if and that therefore the combination of a validity check and enum preparation functions in one spot may cause problems, or at least inconvenience.