I am having an issue with Sitecore's XPath Query utility in the developer centre, I have selected to use 'Sitecore Query Notation' over XPath as I want to return field values of items I am selecting. I cannot seem to get it to return field values like I want to (for example path, and price field on the items)
I am running the query below:
select @@path
from /sitecore/content/Product Repositories/*
And I get the following message:
End of string expected at position 6.
Does anyone know what might be causing this to not return results?
The Syntax select @@path from can be used with Sitecore rocks query analyzer, but can't be used within Sitecore Developer center or by Sitecore query API.
So your query in developer center should be like:
In code, you can retrieve items based on your query then fetch the fields you need