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.