Sub String of Meta Data Location in Workflow

Hi

Subject says it all, I want to store a part of a meta field into a variable in workflow:

Hi iBaldie,

You can use the Watch API with the VBScript Mid() function to extract the part of the barcode you desire. An example is provided below where the last 6 characters of the barcode need to be extracted and passed to the local variable %{BarcodePart}

Option Explicit

dim barcodeStringTemp

barcodeStringTemp= Watch.GetJobInfo(5)
Watch.Log "The Barcode String is: " + barcodeStringTemp, 2

Watch.SetVariable “BarcodePart”, Mid(barcodeStringTemp,11,6)

Watch.Log "The Barcode Part is: " + Mid(barcodeStringTemp,11,6), 2

Regards,

Rod

Even simpler: use the Mathematical Operations task:

The full Math Expression being evaluated is:

Right(Watch.ExpandString("GetMeta(BarcodeValue[0], 10,Job.Group[0].Document[0].Datapage[0])"),13)

And the result is store in the MyValue local variable.