Comparing string variables

I am trying to compare string variables using if condition but my condition does not work. the variables conatin letters and numbers both or only uppercase letters
SupplierPANNumber.CompareTo(pancardoutput1) AND SupplierBankAccountNumber.Equals(accountnumber1) AND Not SupplierBankIFSCCode.Equals(ifsccode1) AND SupplierGSTINNumber.Equals(gstin1) AND SupplierGSTLegalName.Equals(legalname1) Can anyone please help me with this ?

Duplicate / Split of:

here is the sample data
SupplierPANNumber : "ADSFC4567B, pancardoutput1 : null
SupplierBankAccountNumber : “12345678905”, accountumber1: “4567893214”

@ppr i tried your method but it does not work

@Seema_Jethe

May I know how you you are getting those data?

If it is to compare both outputs then you can store those into variables

and use IF condition like PanNumber = Pancardoutput1

Hope this will help you

Thanks

still, we prefer not to split/duplicate a topic. Just continue the discussion on the origin topic. There you can share with us the screenshot of the results from the immediate panel when you checked all condition parts separetly.

@Srini84 yes i am extracting the data and storing it in variables so SupplierPANNumber,SupplierBankAccountNumber,SupplierBankIFSCCode,SupplierGSTINNumber,SupplierGSTLegalName are variables and i want to compare these variables with some other variables which contains some data or no data at all also i want to use not equal to to compare both variables so how do i use not equal to in my if condition to compare the value of two strings?

@Seema_Jethe

As I mentioned in the above post you can use as below

IF

Variable1 = SomeotherdataVariable1

for Not Equal Variable1 <> SomeotherdataVariable1

Hope this will help you

Thanks

@Srini84 I tried using <> and not equal but it does not work

@Seema_Jethe

Please check below

image

It’s working

Thanks

@Srini84


when i use this in my if condition it executes the else part

@Srini84 all are variables in if condition

@Srini84 could u please tell me if my condition is not proper ?

@Seema_Jethe

“” we don’t to put for variables that will consider as Strings not variables, so remove the “”

“SupplierPANNumber” <> “pancardoutput1” As per string this is correct only

But if those are variables then you have to check whether the Supplier PANNumber is holding the pancardoutput1 same value, then you can debug the workflow and check the values in the local pane

Hope this will help you

Thanks

@Srini84 your condition works if i use"" and if i remove “” this it wont work also if i remove the last part as highlighted in below screenshot then also it works Could u please tell me if something is wrong if i use AND AND twice?

@Seema_Jethe

Can you list all the values you are getting into the variables?

Thanks

SupplierPANNumber: “ABCDE345B”
SupplierBankAccountNumber: “123456789052”
SupplierBankIFSCCode: “HDFC000042”
SupplierGSTINNumber: " 27AAICT6025D1ZG"
SupplierGSTLegalName: “TECHLEAGUE ITSOL PRIVATE LIMITED”

pancardoutput1: EJAPS0276M
accountnumber1: 345678231234
ifsccode1: HDFC000042
gstin1: 27AAICT6025D1ZG
legalname1: TECHLEAGUE ITSOL PRIVATE LIMITED

below is the if condition
“SupplierPANNumber”<>"pancardoutput1"And SupplierGSTINNumber.Equals(gstin1) And SupplierGSTLegalName.Equals(legalname1) And “SupplierBankAccountNumber” <>“accountnumber1” And “SupplierBankIFSCCode” <>“ifsccode1”

for the above supplier variables i am passing default value

But it executes the else part Can u please let me know the issue?

@Seema_Jethe

Here the IfscCode1, SupplierGSTNumber, Legal Name are same values

That’s why it is passing to else part

Thanks

@Seema_Jethe

Check below

image

Thanks

@Srini84 if if the below if condition is true then is should log message as shown in below ss



but it logs message as below which has the below if condition