Comparing Queue Item to Item from File Issue

Hi, I need a little help if possible.

I am trying to compare a string of numbers to find matches. One comes from a queue and shows in output as “12345” and the other from an Excel file and shows as 12345. I thought the " was causing an issue so I added the Replace(""""," ") to the transaction item which gave me 12345 so I thought I was good with 12345=12345. But, it appears this still is not working to identify a match. Do I have to actually convert these to an integer? I would think I could just match 2 strings of numbers.

Here is the argument I am using in my If statement:
In_TransactionItem.SpecificContent(“Number”).ToString.Replace(""""," ") =record.Item(“Number”).ToString

Appreciate any hints. Thank you

Can you log the following:

“-”+In_TransactionItem.SpecificContent(“Number”).ToString.Replace(""""," “)+”-"

The extra dashes are to help see where the strings start and end. It looks to me like your Replace is replacing quotes with spaces, which means that you’re checking if '12345'='12345 ' (the quotes are just to help you see, note the space)

Ah ha, interesting. Let me test this.

I think you are correct, there are spaces in there. Do I need to trim rather than replace?

This is crazy but I just noticed that in the csv file that is populating the queue, there is an = sign if you look in the cell. If you look at the cell it’s 12345 but if you look at the value in the cell it is =12345. That is bizarre. That is what’s causing the issue I am sure. Not sure why I wasn’t seeing that! Thank you for the help! Pointed me in the right direction.

1 Like