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

Discussion

Discussion

Quick Fields session needs to capture the date from Page 1 or Page 2

posted on March 7, 2024 Show version history

Hello, 

I've been working on a challenging Quick Fields process where a date could either be on page 1 or 2, and they appear in different areas of the pages. When it's on page 1 it's at the bottom of the page, but if it gets pushed to page 2 it's at the top. I've tried several approaches to this, but I'm not able to consistently capture this value. 

 

The latest method that I have been testing has one Zone OCR activity with a single zone that is large enough to capture the date on either page, and is configured for pages 1 and 2. Then I use pattern matching to locate the date in the text returned. The problem with that approach is that when the date is on page 1, it recognizes the date and captures it properly, but when it attempts to locate the date on page 2 and doesn't find it, it will replace the good value with nothing. When the date is on page 2 it captures as expected. 

 

Is there a better way to capture the date for this use case? Possibly using an IF Conditional activity? Please let me know if I can provide any other information, and thanks in advance for your help. 

 

Brian 

0 0
replied on March 8, 2024

You can also use a conditional. Set the conditional to look for the date text on the page and then have the token set when that condition is met. Only requires the one OCR zone.

0 0
replied on March 8, 2024

You can try something liek this. Create 2 Zones (Page 1 and Page 2) for where the date appears on that page. Use Pattern Matching to Extract the Dates from each Zone. Make sure to uncheck the Use the Imput Value as the Token value if no result is found. Therefore it will be blank when not found.

Then create another Pattern Matching an in that use both Tokens as the input and a regex to pull the date. That way, if either Zone was blank you will only return the found date, if 2 dates were found it will return the first date it finds 

 

0 0
replied on March 8, 2024

Thank you, Steven. This is very helpful and will give it a try. Much appreciated! 

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

Sign in to reply to this post.