Defining Assignment Areas

Unstructured Data filter automatically identifies fields and their values in the received data. This makes manual variable to field mapping unnecessary.

Dynamic structure functionality is helpful if the trigger receives data with changing structure. In such cases, main data structure remains unchanged (e.g., fields are delimited by a comma), or retains the same structure, but the order and/or the number of fields changes. There might be new fields, or some of the old fields could no longer be available. Because of enabled Dynamic structure, filter automatically identifies structure of the received file. At the same time, filter reads field names and values (name:value pairs) from the data. This eliminates the need for manual mapping of fields to variables.

Use Data Filter action does not offer any mapping possibilities, because it performs the mapping dynamically. You don't even have to define label variables in the trigger configuration. The action assigns field values to the label variables of the same name without requiring the variables to be imported from the label. However, this rule applies to the Print Label action alone. If you want to use the field values in any other action, you have to define variables in the trigger, while still keeping the automatic variable-to-field mapping.

Note

There is no error if the field available in the input data doesn't have a matching label variable. Loftware Automation silently ignores the missing variables.

UUID-0f008231-0a59-5d7a-0ffb-44f780894b31.png

Configuring Assignment Area

The assignment area is configured using the same procedure as sub area. For more information, see section Defining Sub Areas. The assignment area can be defined on the root data level, appearing just once. Or it can be configured inside a sub area, so it executes for each data block in the sub area.

Configuring Fields in Assignment Area

When you create an assignment area, the filter automatically defines two placeholders. These two placeholders define the name:value pair.

  • Variable name: Specifies the field whose content is taken as variable name (name component in a pair). Configure the field using the same procedure as for document fields. For more information, see section Defining Fields.

  • Variable value: Specifies the field whose contents is taken as variable value (value component in a pair). Configure the field using the same procedure as for document fields. For more information, see section Defining Fields.

Example

The area between ^XA and ^XZ is assignment area. Every line in assignment area provides a name:value pair. Name is defined as the value between 6th character in the line and equal character. Value is defined as the value between "equals" character and end of the line with negative offset of three characters.

^XA
^FD01DonationHR=G095605 3412625^FS
^FD02DonationBC=DG0956053412625^FS
^FD03HospitalNoHR=HN060241^FS
^FD04HospitalNoBC=060241^FS
^FD05Surname=Hawley^FS
^FD07Forename=Annie^FS
^FD09Product=Blood^FS
^FD10PatientBlGp=O Rh +ve^FS
^FD11DoB=27 June 1947^FS
^FD12DateReqd=25 Dec 2012^FS
^XZ