Comparing to variables

Hello, Guys good evening!!

I’m trying to compare two variables with the following condition:

image

Variable extracted from PDF:
NomeClienteInput
image

Variable extracted from AS400
NomeOutput.ToString.Trim.Equals
image

They really look the same.

The idea is: If they are equal they follow a normal branch if don’t they go into else branch.

Anyone with ideas to share?

Thank you guys!

Hi,

There might be some whitespace except " "(0x20) character.
Can you try the following steps?

First, normalize whitespace in both variables using Assign activities.

strNomeClienteInput = System.Text.RegularExpressions.Regex.Replace(NomeClienteInput.ToString,"\s+"," ").Trim

strNomeOutput = System.Text.RegularExpressions.Regex.Replace(NomeOutput.ToString,"\s+"," ").Trim

Then, check with the following expression

strNomeOutput.Equals(strNomeClienteInput)

Regards,

1 Like

Hello!! :slight_smile:

I’ll try it later or tomorrow. I’ll give you feedback asap :blush:

Thank you

1 Like

@Yoichi Thank you so much, my dear!!
Works very very well!!!

:grin: :blush:

1 Like

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