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

Question

Question

Token Editor: Remove Empty Items

asked on May 26, 2022

I have two tokens that populate a multi value field. I want to use the token editor to "remove empty items" when the token comes back blank. However I cannot get this function to work. My understanding is it is specifically designed for multivalue fields.

 

 

Full disclosure: I feel like I am missing something when it comes to the token editor. I have never been able to get it to work successfully.

 

 

0 0

Answer

SELECTED ANSWER
replied on May 26, 2022

Yes, what you're trying to do seems possible.  But I'm still missing a lot of information from you about exactly what is going wrong.

Pattern Matching can't find empty results... it's job is to capture characters and if there aren't any characters, it won't capture anything.  When there's a mixture  of content and missing content (say, capturing a pattern across multiple lines where some lines are blank), it's still only going to return the content that is present and ignore everything else.

Zone OCR might work instead, if the content is always in the same place (note that you'd need to turn on some "Advanced options" to capture multiple lines as a multivalue token).

When PM doesn't capture any values, what do you want the token value to be? Blank?  I'm actually not sure why it doesn't do this already, but you can work around it by using a Conditional process + Assign Token Value process.  The Conditional checks if the multivalue token, with the Value Count function applied, equals zero.  And, if so, the Assign Token Value process updates the value of the PM token to be blank (or whatever default you want).

Capture Profiles may also be helpful in this situation, but that's a whole different conversation.

As for the "token editor never works", I'm not aware of any issues/bugs with it, but you still haven't told me what you mean by "never seems to work". Without that information, I don't know how to help you.  Maybe ask a colleague or your Solution Provider for some help with it?

0 0

Replies

replied on May 26, 2022 Show version history

I'm not quite sure what you're trying to do here or what is going wrong. Yes, that function is designed for multivalue tokens.  Also, there are some cases where empty/blank values are removed automatically as well (e.g., fields).

Is "Changes Final Date P" a multivalue token?
Is "PCH Rent T" a multivalue token?
Are you trying to prepend "PCH Rent T" to each value of "Changes Final Date P" and then populate the Service Description with each of those values?  Or correlate the values?

When you say "I have never been able to get it to work successfully" regarding the Token Editor, what do you mean?

I was just playing around with Quick Fields 11 and it worked as expected for me.  What version of QF are you using? (just in case it matters--I don't think it will)

0 0
replied on May 26, 2022

Hey Jacob PCH Rent T, Changes Final Date P and Changes Amount P are all separate tokens. Changes Final Date P and Changes Amount P are multi-value tokens generated through Pattern Matching. When it works properly it reads as follows:

PCH Rent 11/11/2022

PCH Rent 12/12/2022

PCH Rent $1,234.56

PCH Rent $5467.67

But when the PM can't find a value it leaves the token name and the field has to be manually overridden. I have tried to use the token editor on a couple of occasions (not just for this function), but it NEVER seems to work. We are currently running v. 10.3.

 

 

0 0
SELECTED ANSWER
replied on May 26, 2022

Yes, what you're trying to do seems possible.  But I'm still missing a lot of information from you about exactly what is going wrong.

Pattern Matching can't find empty results... it's job is to capture characters and if there aren't any characters, it won't capture anything.  When there's a mixture  of content and missing content (say, capturing a pattern across multiple lines where some lines are blank), it's still only going to return the content that is present and ignore everything else.

Zone OCR might work instead, if the content is always in the same place (note that you'd need to turn on some "Advanced options" to capture multiple lines as a multivalue token).

When PM doesn't capture any values, what do you want the token value to be? Blank?  I'm actually not sure why it doesn't do this already, but you can work around it by using a Conditional process + Assign Token Value process.  The Conditional checks if the multivalue token, with the Value Count function applied, equals zero.  And, if so, the Assign Token Value process updates the value of the PM token to be blank (or whatever default you want).

Capture Profiles may also be helpful in this situation, but that's a whole different conversation.

As for the "token editor never works", I'm not aware of any issues/bugs with it, but you still haven't told me what you mean by "never seems to work". Without that information, I don't know how to help you.  Maybe ask a colleague or your Solution Provider for some help with it?

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

Sign in to reply to this post.