EnumList in reference view

Can someone please explain how to create an EnumList from a reference view?

I have a column that’s a reference to another table and I want to display it as an EnumList. I change the Type to EnumList and use the following settings:

This renders an EnumList where I can select multiple items from the list, but unfortunately this changes the referenced column type to EnumList in the data, and breaks all other references to that column. How do I implement EnumList for this ref view without breaking other refs? Do I need to make a separate column to achieve this? A virtual column?

I don’t quite understand. Are you changing a pre-existing column type from Enum to EnumList so you can select multiple values?

If it is the case that you NOW need to be able to select multiple Ref values, then you really have no choice but to change the type of the column to EnumList and update all areas in the app using that are using the column as Enum. If there is something unique about your circumstances, please elaborate.

It really isn’t hard to switch the app to use an EnumList column. The editor will flag all the expressions that need updated. For example, you probably have [Enum Column] = “some value”. You would change these using the IN() function - IN(“some value”, [EnumList Column])

On a side note, in your image above, you would need to remove the App Formula expression. App formulas for for automatic assignment of column values that do not require user activity.

I hope this helps!!

2 Likes

Apologies for not providing more details of my circumstances. In a ref view, I’m changing a pre-existing column type from List, which references a table, to EnumList so that I can select multiple values. Not sure if this being in a ref view changes anything.

Hmm not quite following what you mean that I have no choice but to change the column type to EnumList. In the ref view, I change the type from List to EnumList and the ref view disappears from the form completely. I think the values fail to resolve and that’s why the view is disappearing from my form. Do I need to make an additional change to the type of the column on the data side as well?

Where would those expressions using the IN() function be inputted? In the view or data side? Prior to the change in my screenshots above, the App Formula field has REF_ROWS(“TableName”, “RefToRequest”). But since this column won’t require user activity, it should be left blank?

This does help me understand that EnumList should be an easy change! But I’m still unclear on the necessary changes that I need to make. Looking forward to your response!

It sounds like the column was originally a system-generated Related … column of type List with an App formula that used REF_ROWS(). Generally speaking, you should not tinker with those columns (except to hide them or change their display names). I encourage you to return it to its original form (or just delete it, which will prompt the app editor to recreate it when you save the config).

What are you trying to accomplish? You want users to pick multiple of these Ref values. What do you intend to do with the resulting list of Ref values?

1 Like

That sounds like what’s happening here. I do see REF_ROWS() on a column of type List. Good to know, I’ve returned the column to its original form.

I’m working with an order form basically. You can think of it as a shopping cart where a user selects products to add to the cart and checkout. The order is then added to a view where open and completed orders are listed. With the way the form has been set up, the user currently can only select one item at a time. If they want to order more items, they need to go through the form again. It would improve efficiencies for the user to be able to select all the products they want at once, without having to go through the form multiple times.

1 Like

You are on the right path with EnumList of Ref, it just needs to be a new (regular, not virtual) column.

1 Like

Thanks for your response. When a user selects values from an EnumList, I believe the values selected are added into one cell in the table. Is there a way to add each selected value to separate rows?

I found this post of yours: https://www.googlecloudcommunity.com/gc/Tips-Tricks/FAQ-add-row-per-value-in-EnumList/m-p/357133. Would that be relevant here?

1 Like

Indeed it would!