List of tenants inside a form group

Hi,
My entity implements HasTenant.

I have the bellow settings, for displaying list of tenants in a pickup form field:

image

image

The field stays as regular input. without the options.

  1. Is this the way to display lookup field inside form group?
  2. Can it become a lookup picker?
  3. when I add the field outside of the formGroup it’s working, but the data is not saved.

Thanks

Hi Avi,

FieldGroup automatically displays a LookupField for reference attributes, i.e. links with other entities. Your tenantId is probably a simple data type attribute, so providing options doesn’t help.

If you make tenant attribute a real reference to a Tenant entity in your data model, visual components will reflect this link automatically. Otherwise you have to make a custom field in your FieldGroup, generate a LookupField for it and provide the list of options via setOptionsMap().