I have a pre-existing custom table that has many "items" in it. Each item has attributes that I'd like to pull into kentico pages. In an attempt to achieve this, I created a document type(foo) with a column of 'ItemID' and a query that selects from the previously mentioned custom table(which shares the same column) and implemented the ##WHERE## helper macro.
I then created a page template with a query repeater which utilizes my query.
If I create a new foo and manually enter the ItemID into the where clause in the query repeater I am given a list of attributes as expected. I am hoping to add a macro value into the WHERE clause of the page template, so that all of the attributes populate based off the foo's ItemID.
I thought doing something like:
{%CurrentDocument.DocumentCustomData["ItemID"]%}
would work, but all I get back is an empty string which will break my query.
How can I reference my documents "ItemID" using the macro builder?