SOQL in a snippet

Hi Osman, this is fab - just what I was looking for - thank you! However, I can get this to work when I preview a Skuid page in Salesforce Classic but when I run the same page in a Salesforce Lightning Community it does not run - any ideas?

Cheers!

Louis