Lookup in data table with FindIndex

Dear friends,

I am doing a lookup in a Data Table like this by using an Assign activity.

columnFilteredZMRDT.Rows(3).ItemArray.ToList.FindIndex(Function ( c ) c.ToString.Equals(lookupBewohner))


“lookupBewohner” is a String I pass. Despite this String is just exactly as it is in the Data Table (made an export to Excel to check), the returned value is -1, which means it does not exist.

Does anybody know what I am doing wrong?

Many thanks,

I would suggest to bring the bot into debug and Breakpoint mode. then test is part by part within the watch or immediate box. as it comes from excel also include some trim statements

1 Like

Thank you for your help and answer, I just used now the Lookup Data Table activity, which is doing well now. I was thinking to complicated.

Many thx again!

Perfect. Dont forget to close all your topics when it is working by marking the solving post as solution. So others can benefit from it. Thanks

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