(I’m assuming you are using a ForEach row activity, so I will use row as the row that is looped through and .item as the item within the row). You also need .ToString next to each item in this case.
.Contains and .StartsWith already returns a boolean. If you want it to be false then add “NOT” infront. Also, the column name goes in parentheses.
For example, not (row.item(“Subject”).ToString.StartsWith(“IB.01”) and row.item(“Subject”).ToString.Contains(“INC”))
Notice I put “not” infront cause you wanted false or you can put it for only one like: row.item(“Subject”).ToString.StartsWith(“IB.01”) and not row.item(“Subject”).ToString.Contains(“INC”)
Also, following the order of operations, “or” is similar to “+” and “and” is similar to “x”. So, make sure to use parentheses to group the "or"s together.
For example, (row.item(“Subject”).ToString.Contains(“INC0”) or row.item(“Subject”).ToString.Contains(“Melding”)) and (row.item(“To”).ToString.Contains(“ACD”) or row.item(“CC”).ToString.Contains(“ACD”))
I believe one of your problems was the “=false” which can cause an error, but since .Contains is a boolean you don’t need that part.
So I understand it as you needing the equivalent of Eval() or Evaluate() in UiPath.
I’m not sure that’s available in UiPath, but if it is I would like to know! A few of us here have asked the same questions.
I think you will need to go about your condition in another manner.
Let’s say you have values in Excel that form a condition…
You can then place a formula to calculate that condition and you can read the cell’s value to a variable in UiPath. You then can use that string in the condition such as… condition=“False” or cbool(condition)=False , where condition is a variable containing the word True or False
I bet there are other possible solutions to this as well.
Unfortunately, I do not know of an equivalence of the Eval() function. I thought maybe Microsoft.VisualBasic. might have something but don’t see it.
You could be trying to store your conditions as Regex patterns and use a for each to iterate through the patterns to check if your string is a match with one of them
What would make this tedious for your case is that your conditions concern several properties of your email (Subject,To,CC). You could priorly concatenate those properties into one string but this might have some drawbacks
which condition need put when …Suppose Four (A,B,C,D) column Available And Value is(5,6,7,8) And Condition is If value Is less than 7 Then Write Column E 2 and Suppose Condition Is value is less than 6 then write 1.
please tell me what condition to be put