That can be done directly in Applescript - no need for Where in OF.
Something like:
Code:
tell application id "OFOC"
tell front document
set lstMatch to flattened projects where note contains "StringPattern"
if length of lstMatch < 1 then
display dialog "No matches"
return
end if
tell first item of lstMatch
make new task with properties {name:"Some task name"}
end tell
end tell
end tell