Ref vs Enum while using "Other" value

Hello!

I need some help with determining which Column Type/configuration to use in the case below:

I have a column/form field that looks into a read only reference data source for a list of IDs, Names, and group IDs.

I am filtering the records by the group IDs based on a previous selection in the form. (It shows the user the label of the record (Name) and saves the key (ID) in the column which is what Iโ€™m looking for)

I need the option to let the user select an โ€œOtherโ€ value that doesnโ€™t exist in the reference data.

Right now, I have the column type set to โ€œRefโ€ and Iโ€™m using the โ€œSuggested valuesโ€ to do the filtering of the reference data.

I tried to change the column type to โ€œEnumโ€ and use the โ€œAllow other valuesโ€ feature, but it displays the key to the user instead of the label.

Solved Solved
0 2 282
1 ACCEPTED SOLUTION

@Aurelien Thanks for your reply!

The reference table is read only as the data originates from a SQL database and should only include the original records and not anything the user would add.

I was actually able to add the static record through SQL in order to bring it in so I think Iโ€™m good here.

View solution in original post

2 REPLIES 2

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Caden_Davis

Ref type is correct, as long it is to the table, or a slice that allows Adds in the update mode.
You may want to use the Valid_If field instead of Suggested_Value.
This way, the new data entered by the user will be a part of the Ref data, assuming thatโ€™s what you want.

This is an example with a slice with Adds_Only option

Now, in the table, the column that will be completed by my user, with Type Ref, refers to the source table that allows Adds:
3X_6_b_6b6340fc29d7ee5470c0f58e50d61e2830c0b4e8.png
The expression in the Valid_If expression:

What it gives for the user:
3X_7_6_76c19a72b0c0f05e9afbb886f2802570b23cd780.png

@Aurelien Thanks for your reply!

The reference table is read only as the data originates from a SQL database and should only include the original records and not anything the user would add.

I was actually able to add the static record through SQL in order to bring it in so I think Iโ€™m good here.

Top Labels in this Space