# LookupTableRowType (Complex Type)

### Namespace: http://midpoint.evolveum.com/xml/ns/public/common/common-3

Data structure that represents entire content of the lookup table, organized into table rows. The delta semantics has a slightly different meaning for the lookup tables. Each key must be unique and the key functions as an implicit identifier. E.g. adding a new row with a key that does not exist yet will insert a new row. Adding a new row with key that already exists will overwrite existing row. Replace operation on this property will efficiently clear the entire table and replace it with a new data. We do not recommend using this operation as it may be very inefficient. Add and delete operations are expected during normal operation.

Item Summary
Name | Type | Multiplicity | Description
--- | --- | --- | ---
key | property string | [1,1] | Lookup table key column.
value | property string | [0,1] | Lookup table value column.
label | property PolyStringType | [0,1] | Column that contains a user-friendly label for corresponding to the key.
lastChangeTimestamp | property dateTime | [0,1] | Timestamp of the last change of the row.

- ### Items

  - #### key

    Flags: RAM,runtime

    Multiplicity: [1,1]

    Lookup table key column. This is the mandatory (non-null) column that usually works as a mapping key. If the lookup table is used as an enumeration (there is no value column) then the value of key column will be stored in the property when selected. If the lookup table is used as a map, the value of key column will be matched to the input variable. The value of the key is limited to a usual size of a "database string". The actual size constraint depends on the type of the database used as midPoint repository. It is not recommended to use long values as keys.

  - #### value

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Lookup table value column. This is optional column that represents mapping output. The appropriate row will be selected by using the key. The corresponding value will be used as output. This column has no use if the lookup table is used as an enumeration. The value of the key is limited to a usual size of a "database string". The actual size constraint depends on the type of the database used as midPoint repository. We expect that this column may contain quasi-structured data. But this column is not intended for a very rich data structures, such as long XML snippets. If structured data must be stored in this column then we recommend to use very tight "microformats" such as separating the values with colons. A special-purpose CLOB column for richer data formats might be added in the future.

  - #### label

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Column that contains a user-friendly label for corresponding to the key. This label will be displayed in user interface as a representation of the key. The label has no meaning when the lookup table is used to map values.

  - #### lastChangeTimestamp

    Flags: RAM,runtime,oper

    Multiplicity: [0,1]

    Timestamp of the last change of the row. This is automatically maintained by the repository. It is updated every time the row is created or updated. This row is intended to act as a "token" if the lookup table needs to be synchronized with external resource.