How can I identify Standby and Overtime , expense in front of name in line description
and once its identified only name need to extracted
i have tried below expression but its not working
str_EmployeeName.ToString.Contains(“- Overtime”) And str_EmployeeName.ToString.Contains(“- Standby”) And str_EmployeeName.ToString.Contains(“2x overtime”) And str_EmployeeName.ToString.Contains(“- Expense”)
str_EmployeeName.ToString.Contains("- Overtime") Or
str_EmployeeName.ToString.Contains("- Standby") Or
str_EmployeeName.ToString.Contains("2x overtime") Or
str_EmployeeName.ToString.Contains("- Expense")
In an if statement this should match True when it contains any of those 4 items. When using Ands, it was looking for all 4 in one value.
Edit: You could also shorten the expression down to 3 items by checking the string when it’s lowercase:
str_EmployeeName.ToStringToLower.Contains("overtime") Or
str_EmployeeName.ToString.ToLower.Contains("standby") Or
str_EmployeeName.ToString.ToLower.Contains("expense")
You should Split these on - to separate the name from the other info. Best way would be to use the Table Extraction wizard to scrape the data, then you can split the column into two. Then you’ll have a name column and a details column or whatever you want to call them. Then you can use activities like Filter Datatable.