I have a datatable input from Excel in which there is a column called “Final Result”. In the For Each Row activity, some activities will be performed if in that row the final result is input as “Y”, “Yes”, “yes”, “y”, “YES”, “YEs”, “yES”, and “YeS”. For this, I am using If condition activity.
It would be ineffective coding if the condition is like this:
Row.Item(“Final Result”).ToString.Trim = “Y” Or Row.Item(“Final Result”).ToString.Trim = “Yes” Or Row.Item(“Final Result”).ToString.Trim = “yes” Or Row.Item(“Final Result”).ToString.Trim = “y” Or Row.Item(“Final Result”).ToString.Trim = “YES” Or Row.Item(“Final Result”).ToString.Trim = “YEs” Or Row.Item(“Final Result”).ToString.Trim = “yES” Or Row.Item(“Final Result”).ToString.Trim = “YeS”
So, I wonder if there is a better way to do this?