I have a switch and some situations where I should be able to evaluate whether a variable contains a certain value. However, I get an error when I add the “contains” syntax: Overload resolution failed because no accessible “contains” accepts this numer of arguments.
How can I still achieve this within my switch activity?
If you want to use contains you will have to change the whole condition to add outputs and then check the outputs.
Like Uthraa said contains takes a argument varPO_Sector1.ToString.Contains(“Machinery”) for example
See the below if this helps as it fits your use-case
Thanks, because sometimes I have “AND” three times and I need the value after the first “AND” and the characters between brackets can be 3 or 4 or 5 or even 10.
Another “split” question. I need to split the following “2010 - trmlo202010 - 21 - 23” and the output should be “trmlo202010 - 21 - 23”. If i split on “-” with index 1, I only get the ‘trmlo202010’ part. Also it is variable, I know there will be at least 1 “-” and I need to get the string after this first “-”.