Attribute Type for Lookupfield

Hi,

I observed that if we need to make any field as lookup , we need to change Attribute type in Data Model to ‘Association’.
My question is how can I make one field dropdown if I dont want to change ‘Type’ to ‘Entity’ in data model. Below image has a field ‘type’ and I want to see that as drop down manner.
The field ‘type’ exist in same entity (Browse screen) and I am not fetching it from any other entity or datasource.

Capture

Hi,

The LookupField can be used to display either a list of entities or just a list of strings or arbitrary objects. Nothing prevents you from creating a simple String attribute of an entity: you can always create a custom field of LookupField type in this entity’s editor.

See also:
https://www.cuba-platform.com/discuss/t/populate-lookup-field-based-on-query/1849/2?u=shiryaeva
https://www.cuba-platform.com/discuss/t/fill-combofield-with-values-from-for-loop/1599

1 Like