Filtering Data Table Filter Rows

Hello,

I am using the Filter Data Table activity to only show me items that have the following:

Subject column Starts With “Undeliverable”
DateTime columns does not start with either of “Mon”, “Tue”, “Wed”, “Thu”, “Fri”

image

The output for some reason is still showing items that start with something other than “Undeliverable” and shows all items with days of the week in DateTime.
image

What am I doing wrong please?

Also, is the top row in the Rows Filtering an AND or an OR condition? And does the order of conditions matter? My experience with other pieces of software is that one usually configures ORs and then ANDs. Many thanks!

UPD: Thank you, funnily enough I just changed all the OR conditions to AND and it produced the results I needed. Doesn’t make sense but worked so fine by me.

I asked the moderator to delete this topic, thank you all for your answers.

You have an “And” in front of your last filter condition. Could this be the problem?

hello,

I think AND is correct, since I only want items with “Undeliverable” in the subject line.

I would have thought the days of the week would all be OR, since it can be any combination.

Hi

I think the column DateTime is formatted as a date so you won’t be able to use this… Try using the select function.

ExtractDataTable.Select("([DateTime] not like ‘%Mon’ OR [DateTime] not like ‘%Tue’ OR … ) AND [Subject] like ‘Undelivrable%’")

The % is like a wildcard and like is like a contains.

Later edit: by the way the output of this function will be an array of rows so your dtUndeliveredEmails should really be an array of DataRows

Thank you, funnily enough I just changed all the OR conditions to AND and it produced the results I needed. Doesn’t make sense but worked so fine by me.

I asked the moderator to delete this topic, thank you all for your answers.

Hi byuli,

recently this happened to me as well.
You might confused (like I was) between filtering for each row and filtering whole datatable.
In filter datatable, the analogy is more less as follows:
*"search ALL rows in dtvariable which fullfil the xxx condition OR *
*“search ALL rows in dtvariable which fullfil the yyy condition”

This validation rule makes sure that every rows which fullfil the condition will be filtered.
If you put END clause in it, it will combine it for every rows, and for sure it will include the columns of which the subject is not “Undeliverable”, as it combine the both OR and AND, as email from “Saturday” or Sunday (for instance) fullfils your first condition, no matter if it is “deliverable” or “undeliverable”.

cheers