Enum writing label to table

Hi - I have a number of fields in different tables which are Enum with base type Ref.  For all of these fields, the user can add new values instead of selecting from the existing list.

However, when the user first creates the value the id is written to the table.  But any subsequent use of the (new) value, results in the label being written.  The fields are sorted using Sort(reftable[sort column]) in the "Suggested values" formula, but no other non-standard settings have been set.

Any suggestions on how to resolve?

Example - 

seanconkie_0-1663625694977.png

Row 25 is when the value "Beef" is first created in the base ref table.  When it is later used again on row 38 it uses the label value "Beef" instead of the is 3efdf585.

 

Solved Solved
0 6 141
1 ACCEPTED SOLUTION

I believe it has to do with the fact that your SORT() returns a list of the [sort column].

Try using ORDERBY() instead of SORT() because the expression in Suggested Values should return a list of key values.

ORDERTBY(reftable[key], [sort col])

View solution in original post

6 REPLIES 6

I don't understand the issue you're describing. Try posting screenshots of the AppSheet column properties for the columns whose data you posted.

I believe it has to do with the fact that your SORT() returns a list of the [sort column].

Try using ORDERBY() instead of SORT() because the expression in Suggested Values should return a list of key values.

ORDERTBY(reftable[key], [sort col])

Thanks for your suggestion, this resolved the problem.  Although, it has removed the search from the enum fields dropdown - do you know if this can be added back?

It should not affect the search function...

TeeSee1_0-1663651956950.png

I cannot think of any reason why your has disappeared..

No, I'm not sure what has happened ๐Ÿ˜‚

 

seanconkie_1-1663685501855.png

 

Top Labels in this Space