Skip to main content
Documentation & User Guides | FotoWare

Extracting part of a metadata field

Learn how to extract metadata from assets in a workflow in such a way that the field identifiers are also stored in the text file. This allows you to "reverse" the process and apply metadata to assets using the text files as metadata templates in a separate channel. 

Operators

In the examples below, we will assume we'll be working with the following example metadata in Custom Field 1 (#200):

aaa_bbb-ccc/ddd/eee/fff ggg

Extracting x number of characters from the beginning of a field

Syntax: #nnn!xx

Example 1:

#200!6

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Result: aaa_bb

Example 2:

#200!11

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Result: aaa_bbb-ccc

Copy the characters from (1 based) pos a to pos b (including)

Syntax: #nnn!a~b

Example 1:

#200!5~7

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Result: bbb

Comment: Characters 5, 6 and 7 copied

Example 2:

#200!9~12

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Result: ccc/

Comment: Characters 9 thru 12 copied

Copy the characters from part number a in string split by character x and y

x is the character before start of the wanted part. A space here will also indicate beginning of the field when a=1.

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Syntax: #nnn!a~xy~

Example 1:

#200!1~ _~

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Result: aaa

Comment: Split string on space and then split the first part on '_'. 

Example 2:

#200!2~_-~

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Result: bbb

Comment: Split string on '_' and then split the second part on '-'. 

Example 3:

#200!3~//~

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Result: eee

Comment: Split string on '/' and take the third part.

Example 4:

#200!2~  ~

Source string: aaa_bbb-ccc/ddd/eee/fff ggg

Result: ggg

Comment: Split string on space ' ' and take the second part.

 

New line

Only applicable for multi-line fields

Example: 

#nl

​​​​​​Source string This is line 1#nlThis is line 2

Result:

This is line 1
This is line 2

 

Put a 1 if word is found in field nnn, 0 if not

#nnn?"searchword"

Example: 

#200?"bbb"

Source string:  aaabbbbcc
Result: 1

 

Extract to a repeatable field and split strings at x separator character

Only REPLACE and ADD

#nnnx

Example:

  #200;

Source string:  aaa;bbbb;cc
Result:

aaa
bbbb
cc

After 'a' occurances, copy the rest of field 'nnn'

#nnn!a~x~  in field 'nnn' look for character x.

Example:

#200!2~/~

Source string:  aaa_bbb-ccc/ddd/eee/fff ggg
Result: eee/fff ggg

 

#nnn!XMP

Only valid for date fields 'nnn'. Copy the date field content exactly as is.
Normal behavior when copying to a text field from a date field is to format the date according to system settings.