Writting labels from an enum list with Base Type Ref

I want to write the labels of an enum list with base type Ref, but I haven't found the formula to do it.

This is the enum list with base type Ref column.

AppSheet 1.png

This is the "Piezas Chapistería ID" column in my Google Sheet.

AppSheet 2.png

Here you can see the column in the form view. The user must be able to select one or more items and create a new item.

AppSheet 3.png

I want to write the labels in the column "Piezas Chapistería".

AppSheet 4.png

I have to create a PDF, so if I do it with the "Piezas Chapistería ID" column, I'll get the keys instead of the labels (values) of those keys.

AppSheet 5.png

The table "Piezas Chapistería" has just 2 columns, the ID and the label as seen below.

maretec_0-1714354400493.png

I have tried different formulas.

AppSheet 6.pngAppSheet 7.png

Can anyone help me with this?

 

Solved Solved
0 3 69
1 ACCEPTED SOLUTION

SELECT(Piezas Chapistería[pieza], IN([Pieza id], [_THISROW].[Piezas Chapistería ID]

View solution in original post

3 REPLIES 3

SELECT(Piezas Chapistería[pieza], IN([Pieza id], [_THISROW].[Piezas Chapistería ID]

I knew that the IN expression is a Y/N expression, but I didn't realize that used together with the SELECT expression it is like SELECT(Table[Column], TRUE).

The formula works fine. Thank you @TeeSee1.

When entering the formula, the editor gave me an error because it automatically sets it as a LIST type column and only virtual columns can be of this type. I tried columns of type EnumList and Text, and the formula works with both.  Does it matter if I choose one or the other?

In my application, it is important to set the column as EnumList, because I have to put those values/labels in PDF, each on a single line as shown below.

maretec_0-1714410533198.png

If I set them as Text, all the values/labels are placed in one paragraph, one next to the other.

maretec_1-1714411105127.png

As a matter of fact, you gave me the solution to put those labels each on a single line.

Top Labels in this Space