Topic Options
#57069 - 05/24/19 12:21 PM Advanced Condition using Metadata and If Statement
dstauder Offline
OL User

Registered: 06/28/02
Posts: 74
Loc: St. Louis, Missouri USA
Hello all,

I am trying to create a condition where the Metadata, if it has '0367' in the string, it is true.

I have tried this:

=if(pos('0367',MetaDataField1)>0)

It doesn't like the "if" in the "Advanced Condition" box.

I have defined the MetaDataField1 as this:

=GetMeta('DataFile[0]', 1, 'Job.Group.Document') which is the Drive Letter and File Name (F:\0367 2019_04_11_041234 1024928848.pdf)

The first 4 digits in the file name is what I am looking to match. If it matches, the condition should be true.

Any help is appreciated.

Thank you,

Dan Stauder

Top
#57070 - 05/24/19 01:53 PM Re: Advanced Condition using Metadata and If Statement [Re: dstauder]
jim3108 Offline
OL Expert

Registered: 04/19/10
Posts: 268
Loc: London, UK
You're basically there. Because you're in a condition field, you don't need the if. Just the test.

Code:
=pos('0367',MetaDataField1) > 0

That is presuming that you're referring to the MetaDataField correctly.

I'd probably lose the field and just do it in one swipe:
Code:
=pos('0367', GetMeta('DataFile[0]', 1, 'Job.Group.Document')) > 0


Hope this helps.
_________________________
James Stacey
Point Zero Solutions | Automate. Business. Workflow.

james@pointzerosolutions.co.uk

gmail: sirstace
skype: jim3108
-----------------------------------------------------------------------------

Top
#57071 - 05/24/19 03:16 PM Re: Advanced Condition using Metadata and If Statement [Re: dstauder]
dstauder Offline
OL User

Registered: 06/28/02
Posts: 74
Loc: St. Louis, Missouri USA
Jim,

Thank you. I am overcomplicating things again. I appreciate the quick answer.

Cheers,
Dan

Top