Greetings,
We've recently upgraded to V10 and are experimenting with Design Studio to display data to employees through Portal.
I created a Custom Page and selected the Script tab. A variable that represents a date 367 days prior to the current date was created using JavaScript. I then added a Data Query to the page and built the query using the API Builder. I moved on to add criteria and selected "User Variable" but could not locate the new JavaScript variable in the dropdown list. So I selected "Literal" and tried <<VariableNameHere>>. The API Builder added the criteria and changed it to "(User Variable)". I thought this looked good! When I preview the page, the JavaScript Date Variable criteria has no effect on the query results. All records are returned when we would only expect two records to be returned.
My question is how do we correctly utilize JavaScript variable within the API call? AM I asking too much from the API?
SQL and expected results:

API Builder showing Variable:

This is the result we get when previewing the page. Note, the textbox is displaying the correct date at the top formatted as YYYYMMDD:

Thoughts? Are we utilizing the wrong tool?