I would have thought this would be simple, but it doesn’t appear so…
I am using a For Each Excel Row, and for each row, at CurrentRow.ByIndex(0), it is reading what is in the cell, and then performing a send hotkey action based on what is inside.
So,
Using Assign activity,
arrHardware = {“A*”, “B*”, “C*”}
So, if there is for example “Apple” in the excelcell, the wildcard operator would take care of the “pple” and read it as “A”.
It doesn’t look like this is working though. Doing a little bit of reading, it looks like I may need to use regex? I see wildcard operators for selectors, but for arrays it seems a bit different.
Always appreciate the quick and amazing help on here!
the contains method offered for a collection e.g. array is not supporting Wildcards and is using the item value - e.g. A*
We can implement such check with alternates, but would recommend to crosscheck the use case / scenario before
arrHardware = {“A*”,“B*”…}
as described in your flow would/should have a match on “The new Apple IPhone” for A* - Apple
But it would also match “Pay with American Express” - A* American
Maybe we have misinterpret your case and you can eleaborate more on it. Thanks
(From p in arrPatterns
Let ms = System.Text.RegularExpressions.Regex.Matches( CurrentRow.ByIndex(0).toString.ToUpper, p)
From m in ms.Cast(Of Match)
Select v=m.Value).toArray
So, now it is all about the patterns and its finetuning
Also Have a look here:
Feel free to share with us some more specific sample data