Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ltollesonThe code below will also do what you are asking. This code will work for any number of fields and does not require knowing the field names.
Simply copy and paste this code into a filter node. You could also parameterize the node to allow users to input a string to search.
fields = map(&field, inputFields())
fieldCount = 0
i = 0
while i < fields.len()
{
if fields.getItem(i).str().strFindI("yes") > -1 then
fieldCount = fieldCount + 1
i = i + 1
}
emit *, fieldCount
#where fields.find("yes") > -1