String comparison issues?

Hi there,

I am trying to write some code in an assign activity (Boolean). I am comparing a full address from a 3rd party system to that of our own on a JSON file. So, I want to write ‘does the full address NOT contain X, Y & Z - True or False?’

I’ve written as below:

Not (pFullTradingAddress.Contains(pJsonTradingAddress1
) Or
Not (pFullTradingAddress.Contains(pJsonTradingAddress2
) Or
Not (pFullTradingAddress.Contains(pJsonTradingAddress3
) Or
Not (pFullTradingAddress.Contains(pJsonTradingAddressTown
) Or
Not (pFullTradingAddress.Contains(pJsonTradingAddressCounty
) Or
Not (pFullTradingAddress.Contains(pJsonTradingAddressPostCode
) Or
Not (pFullTradingAddress.Contains(pJsonTradingCountry
) )))))))

I’m not entirely sure why it isn’t working, I’ve ran it with test data where it should be flagging as ‘true’ but always shows as false. Any ideas what I’m doing wrong?

Thanks for your help!

Hi,

Can you share specific examples?

Regards,

I can’t of the fields as I’m testing with customer data.

I altered a JSON field to add additional letters in order to deliberately be different, which should have flagged, but it didn’t :frowning:

Hi @dr1992 ,

You could use a Write Line Activity on the Possible variables you think that should contain the modified value.
Also, you Could use a Write Line Activity on the pFullTradingAddress and Check whether it contains the variable value.

You should then be able to understand if the Modification has been reflected or not.

Also, you could Alternately Check by Debugging as well.

Since, it is related to Data validation, we may not be able to help you further without Data Examples.

Hey, thanks for your reply.

I tried your suggestion, I think the issue may lay elsewhere.

Thanks for your help.

1 Like

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