HOME COMMUNITY BLOG
Skip to end of metadata
Go to start of metadata

Data structure fields are used in the following cases:

  • AllColumns = False in the data structure entity. You then have to specify the fields which will make up the structure.
  • AllColumns = True in the data structure entity but you want to add additional fields which either have ExcludeFromAllFields = True in the entity or you want to use UseLookupValue attribute to look-up some other data.

Attributes

CaptionOverrides a Caption defined in the source data entity field. If you need a different caption for the field than defined in the entity, you can define it here.
FieldSelects the source data entity field.
DefaultLookupOverrides a DefaultLookup attribute defined in the source data entity field. If you need a different lookup than defined in the source field, you can define it here.
UseLookupValue

If True, the column will not contain data defined by the source field (defined in Field), but it will contain data returned by the lookup. The value defined in the Field attribute will be passed to the lookup as a parameter.

UseLookupValue Example

You have an Invoice entity, which contains fields Id, InvoiceNumber and refBusinessPartnerId. You are creating a report in which you want to display the invoice number and business partners's name.

What you need to do is to create a simple data structure, which will contain the data entity Invoice. You add all the fields (explicitly) and you set the following attributes to the refBusinessPartnerId field:

NameBusinessPartner_Name
UseLookupValueTrue
DefaultLookupBusinessPartner

By doing this, the field will return the business partner's name, instead of the Id, by looking up the name by the Id, which is originally contained in this field.

 In reality it will make the following SQL statement:

  • No labels