You are viewing limited content. For full access, please sign in.

Question

Question

Substitute multiple tokens into one value

asked on September 29, 2015

I have a Quick Fields session that identifies different types of shipping documents.  The Bill of Lading (BOL) is first and it contains three conditionals to determine the Shipper (PTI, GTI, or Other) on the BOL and separates them accordingly.  After it follows the conditional, tokens are created for each Shipper.  This goes into a field and could look like any of the following:

PTI(%GTI)(%Other) or (%PTI)GTI(%Other) or (%PTI)(%GTI)Other

What I need to return is only the value NOT in token format.  Example 1 would return PTI only.  I'm thinking this should be done in post-processing with Substitution, but I'm not all that familiar with it and I'm not getting good results.  Any other ideas?!?  

Thanks,

Nate

0 0

Replies

replied on September 29, 2015

I feel slightly confused about the question. Can you provide an example input and the expected output(s) so it may be a little clearer what you are getting from Quick Fields and what you are wanting from the output. This will make it easier than just using the tokens above where its unclear how the data looks in real life.

0 0
replied on September 29, 2015

Hey Kenneth,

In each conditional path within my BOL classification, I create a token to ID who the shipper is.  The three conditional branches are PTI, GTI, and Other.  The tokens and values are as follows:

(%PTI) returns PTI

(%GTI) returns GTI

(%Other) returns Other

If the image follows the GTI branch, the other tokens are placed in the field and the field would look like (%PTI)GTI(%Other) when stored into the repository.  In the particular case above, I would like to only place the GTI in the field and parse the (%PTI) and (%Other) token values.  

Realistically, the tokens should not populate the field if the condition branch is not followed, however that is something I've seen several posts about and hopefully will be addressed in QF10.  Then I wouldn't have to do any Pattern Matching/Substitution!  

0 0
replied on September 29, 2015

i still seem to be confused. are you saying that an example would be 123GTI456?

 

and then it would need to be parsed into X fields? (how many fields are we dealing with)

 

so, 123GTI456 would fill:

Shipper: 123GTI456

 

 

I am getting confused since it seems you are describing two situations but they both are using the same premise no changes and the same field and same input, so why are they not that same?

0 0
replied on September 29, 2015

I am not describing two situations.  I have a Quick Fields Classification of Bill of Lading (BOL) that has set criteria to determine if the scanned image is a BOL.  If the image is a BOL, I am using three different conditionals to determine who the shipper of the BOL is...  Within EACH conditional a token is created, but obviously the image can only pass through ONE conditional path.  When the image passes through one path, the token is created correctly (ex: GTI), however the other two conditional tokens still get placed in the field as plain text (ex: %(PTI)).  I'm looking to remove the plain text tokens and only store the valid token (Met conditional path).  Below are a few images that might help describe what I'm doing.  

Quick Fields Setup

QF Session

 

Repository Result

0 0
replied on September 29, 2015

That's because the tokens are not created in that case, so they're treated as literal values. Try assigning the tokens not relevant to the current branch to blank or create them all as blank before you go into the conditionals.
 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.