Does anyone know how to use the new get Attribute function in conjunction with the "Like" command?

I have a table with an Attribute "Sub_Region" and want to show the features that match the atlas feature of the same name...

The syntax below works for "=" "Sub_Region" = attribute($atlasfeature, 'Region_Name')

However, some of my precincts cover two regions, so the attribute might be 'Central, Western'. I can manually show only those of interest by selecting: "Sub_Region" like '%Western%' .... however I want to inset the Attribute function so that I don't have to manually change the query as I export the atlas but can't work out the correct syntax...

Any suggestions?

1 Answer 1


Try something like:

  "Sub_Region" like '%' || attribute($atlasfeature, 'Region_Name') || '%'
  • perfect! thanks. I knew it would be obvious as soon as I got it...
    – Jamie
    Commented Nov 28, 2014 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.