Create variable from matched variables

Long and short, I’m using 3 different OCR engines to convert a PDF to text but I only want to keep and use the variables that match into a final text output. So, let’s say the first OCR engines pulls an ‘Account Number:’ as “1234”, the 2nd OCR (for whatever reason) pulls nothing, and the last pulls “1234” again. I only want to use the “1234” as the variable that I’ll be using in my final output since it matched.

// OCR with Engine 1
Read PDF Text activity → Output: OCR_Result_1

// OCR with Engine 2
Read PDF Text activity → Output: OCR_Result_2

// OCR with Engine 3
Read PDF Text activity → Output: OCR_Result_3

// Compare and Store Matching Result
If activity
Condition: OCR_Result_1 = OCR_Result_2 Or OCR_Result_1 = OCR_Result_3
Then:
Assign → Final_Result = OCR_Result_1
Else If activity
Condition: OCR_Result_2 = OCR_Result_3
Then:
Assign → Final_Result = OCR_Result_2
// Add more conditions if needed

// Now Final_Result contains the desired value

Thanks! I’ll give this a try :slight_smile:

@AdRoKa
Welcome to the forum

Are you looking for something like this?
grafik

we are rating on the occurence count

For sure we can adapt and refine it (e.g. blank filters…)

Maybe? I’ll certainly give it a try…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.