Is a filter available to skip items that contain a specific text element? I would like to import the google calendar feed and skip all items that contain a specific word in the description element.

Thanks!

Comments

Sorin Sarca’s picture

You can create a simple function for that:

function containsText($field, $text) {
  if (stripos($field, $text) === FALSE) {
      return  NULL;
  }
   return $field;
}

Also you need to set as default action: Skip importing.

brendanrjohn’s picture

This sounds like a really useful function. Could you explain it a little further? Where should that function code go? Where do I then get to set the text and field that should be matched?

Sorin Sarca’s picture

Issue summary: View changes
Status: Active » Closed (fixed)