1. What is the issue? Please be detailed.
(I couldn't find this topic addressed directly, this is partially a question and partially documenting how to move from a CSV to an entity list and still return desired name
values in the submissions)
When creating an entity list, the entity property name
is prohibited. Likely as this used to be used for the UUID before it changed to __id
as seen in the quick start video at 6:00.
In many cases, the name
value in a choice list / CSV is different to the label
value (select a name, return an email / include more description in the label or emoji status indicators / multilanguage labels / spaces allowed in label but not name...)
If I want to replace an existing choice list / CSV with an entity list, and am expecting particular values returned when selecting an item from it (as before, select my name
but return value my@email.com
or select ❗🔴 Item Natural Name
and return item_system_code
), currently, the select will return the UUID.
It would be possible to add a calculate, so the first field would be the select ${selected_item}
and then the calculate field ${item}
would get the desired value from the entity list with a property like name_value
via an instance lookup, but this adds a field eg;
type | name | label | calculation |
---|---|---|---|
select_one_from_file my_item_list.csv | selected_item | Please select the item | |
calculate | item | The lookup | instance('my_item_list')/root/item[name=${selected_item}]/name_value |
From some searching, @LN previously suggested specifying a value
column in the parameters, eg;
type | name | label | parameters |
---|---|---|---|
select_one_from_file my_item_list.csv | selected_item | Please select the item | value=name_value |
The second option appears to be the simplest, but is there a better approach to this that I've missed? Will name
be forever prohibited as an entity property?