Data structure fields are used in the following cases:
AllColumns = Falsein the data structure entity. You then have to specify the fields which will make up the structure.
AllColumns = Truein the data structure entity but you want to add additional fields which either have
ExcludeFromAllFields = Truein the entity or you want to use
UseLookupValueattribute to look-up some other data.
|Caption||Overrides 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.|
|Field||Selects the source data entity field.|
|DefaultLookup||Overrides 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.|
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.
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
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: