Best practices/optimization question regarding Enums/Data Validity

Is there a difference in performance between an Enum field and a Text field with Data Validity to a table (making it a dropdown selection field).

Solved Solved
0 5 146
1 ACCEPTED SOLUTION


@WillowMobileSys wrote:

With a Text field and validation, there are no choices.  The user enters a value and then validation will tell them if it is not accepted.


 

A list-returning valid_if in a Text column does in fact show as a dropdown as the OP has described. 

@TennysonK , I wouldn't concern yourself with any difference here.

View solution in original post

5 REPLIES 5

Not discernable difference in performance.  However, there is a difference in user experience.  It is much more annoying to allow a user to type in a field only to tell them they've typed it wrong IF instead you are able to provide a clear list of choices with an Enum.

If you know the choices and can list them in an Enum, in my opinion, that is a much better way to go.  Enums can also allow users to enter additional items that become part of the dropdown list.

The user experience is no different between the two types except for enums allowing users to enter additional items (if that functionality is needed). A Text field with data validity is shown as if it were an enum in the app. It's because there's no user difference (apart from being allowed to add to the list) that I wonder if there is a performance difference and how much it may be.


@TennysonK wrote:

The user experience is no different between the two types except for enums allowing users to enter additional items


I am not sure what you mean by this.

The purpose of an Enum is to present to the user a list of KNOWN valid choices - either hard coded into the column or by use of an expression to gather the choices.  Yes you can allow them add additional values that will show up in the choice list later.

With a Text field and validation, there are no choices.  The user enters a value and then validation will tell them if it is not accepted.

Since you haven't articulated what kind of data entry you are trying to support, maybe your use case is such that you have general validation guideline but can't show a discrete pick list of values.  In this case, a Text field with validation is the only way to go.

However, if you CAN show a pre-determined pick list of choices to the user, then an Enum column is MUCH more user friendly.

 


@WillowMobileSys wrote:

With a Text field and validation, there are no choices.  The user enters a value and then validation will tell them if it is not accepted.


 

A list-returning valid_if in a Text column does in fact show as a dropdown as the OP has described. 

@TennysonK , I wouldn't concern yourself with any difference here.


@Marc_Dillon wrote:

A list-returning valid_if in a Text column does in fact show as a dropdown as the OP has described. 


Really?  I had no idea.  No wonder I didn't understand what he meant. Time to learn something new!!

 

Top Labels in this Space