Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8901

UniversalViewerWithCustomQuery Where Clause using a QueryString Param

$
0
0
I would like to load a page with the UniversalViewerWithCustomQuery webpart using a query string parameter in the page URL: Page URL w/ Query string parameter: mysite\home\mypage.aspx?id=3My Content Queries that I have tried thus far: SELECT Top 1 ObjectID,Field1,Field2 FROM MyTable Where ObjectID = {% QueryString.id %} Get Error: Incorrect syntax near '%'. So then I tried: SELECT Top 1 ObjectID,Field1,Field2 FROM MyTable Where ##WHERE## Content filter Where clause: ObjectID = {% QueryString.id %} Get Error: Invalid SQL query in property @wherecondition@.I have also tried to use just a string {% '3' %} in place of the querystring parameter and get the same errors. I know I'm doing something wrong but cannot figure out what...

Viewing all articles
Browse latest Browse all 8901

Trending Articles