Field Lookup

This task is intended to allow users the ability to perform a look-up operation and update the matching fields of the repository documents. This task was originally created for integrations in which certain field values could only be obtained by importing them from an external source.

The filter expression can use any of the 3Sixty Expression Language components to form simple or more complex expressions for evaluation by 3Sixty. If the expression evaluates to true, the document will continue to be processed.


Configuration

To use this task go to the task tab in your job. Select the task from the drop down and click the plus circle to configure the task. Click done after making any changes to save.

Condition check

It will execute the task when the condition's result is 'true', 't', 'on', '1', or 'yes' (case-insensitive), or run on all conditions if left empty. This condition is evaluated for each document, determining whether the task should be executed based on the specified values.

Example: If I only want to run this task for PDF documents I would use the expression: equals('#{rd.mimetype}',"application/pdf")

Delimiter

Denotes the delimiter character if values are not in list format.

Property Field

  • Path: Uses preset configurations to evaluate values against the path

  • File Name: Uses preset configurations to evaluate values against the file name

  • Other Property: Evaluates a property entered by the user against the given values

Property Name

A specific property entered by the user. This property will be used only if Other Property is selected from the property field drop-down list.

Values

Key=Value listing to be used as the source data for the lookup operation.

Look for an exact match:

If set to true, properties that have an exact (whole case) match will be updated. If set to false, properties that contain the entered value(s) will be updated. For instance, if set to true the value 123 will only have a match with 123. If false, a match will be identified if 123 is present in any part of the field and only that portion will be updated with the new value.


Examples

The Field Lookup task can be used as a quick find and replace during integration. THis can be used to change the file name, the folder path, or other properties.

Use Case 1: Updating a file name

If you want to change the name of a file during integration you would use the following configuration.

  • Property Field: File Name

  • Values: Sample File=Test File

  • Look for exact match: True

  • Add Override Different/New Field instead: False

  • New Field Name: (leave default)

When you run your job, any files with the file name ‘Sample File’ will be named ‘Test File’ in the output folder.

Use Case 2: Updating part of a file name

If you want to change part of the file name you can enter the old value of the part you want to change and the new value of what you want to change it to and 3Sixty will only update the part of the file that matches the value given.

  • Property Field: File Name

  • Values: Sample=Test

  • Look for exact match: False

  • Add Override Different/New Field instead: False

  • New Field Name: (leave default)

Using this configuration if you have 3 files titled (Sample 1, Sample 2, and Sample 3) in the output folder the files will be renamed to (Test 1, Test 2, and Test 3)

Use Case 3: Creating a new field based on the value looked up

If you want to keep the file name while also having a field with a new file name you can use a similar configuration to the following.

  • Property Field: File Name

  • Values: Sample File=Test File

  • Look for exact match: False

  • Add Override Different/New Field instead: False

  • New Field Name: Test Name

Using this configuration, when 3Sixty runs the job it will create a new field titled Test Name and in that field will be the new name of the files. (Test 1, Test 2, Test 3)

Advanced Use Case 1: Updating files based on another file

3Sixty can utilise any properties that are associated with a repository document. We recommend running a BFS output job with no mappings and Include Un-Mapped Properties set to True. This will generate a xml file similar to the example below and allow you to see what properties are available for your documents:

Copy
<properties>
  <entry key="document.name">3Sixty Overview.doc</entry>
  <entry key="type">document</entry>
  <entry key="folderpath">test3Sixty_Setup</entry>
  <entry key="document.Culture">en-US</entry>
  <entry key="document.Customer">123456</entry>
  <entry key="document.Category">training</entry>
</properties>

In the example above you will notice that the document.Customer field has a numerical value associated with it, but not the actual customer name. The task will allow you to import a list of customer IDs along with their associated customer names and update those values as desired.

The updated values will then be available in subsequent job tasks. For instance, you could then use override folder path task to build out a folder structure with the updated values. Using the scenario above, you could build out a folder for each customer by name instead of numerical value.

Advanced Use Case 2: Skipping files based on the file name

If you want to exclude the OS level file Thumbs.db in your job, you can filter those files out using the following statement: !equalsIgnoreCase('#{rd.filename}', 'Thumbs.db')

The above example will find all the files that have the name 'Thumbs.db' and set the expression to false for the documents. Therefore, all files with the name 'Thumbs.db' will be skipped.


API Keys

Processor: fieldLookupTask

Key

Display Name

Type

use_condition Check a condition before executing this task. Boolean

task_condition

Condition

String

task_stop_proc

Stop Processing

Boolean

jt_delimiter

Delimiter

String

jt_property

Property Field

String

jt_other_name

Property Name

String

jt_folderpath_pattern

Values

String

jt_exact_match

Look for an exact match

String

jt_new_field

Add/Override Different/New Field instead?

String

jt_new_field_name

New Field Name

String