Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > WHERE condition View modes: 
User avatar
Member
Member
davidj-millerdavisagency - 1/13/2012 3:41:02 PM
   
WHERE condition
Need to compair document names in the WHERE condition of the repeater webpart. Basically compairing the current document name (got it) with other document names in the document tree. Can't figure out how to specify the macro to determine the other document names. I see in the Macro Context Value CurrentPage but nothing to pull in the name of other pages.

Any help would be appreciated.

User avatar
Kentico Support
Kentico Support
kentico_janh - 1/16/2012 1:42:11 AM
   
RE:WHERE condition
Hello,

There are IN and NOT IN functions in SQL language for comparison between two fields, so your macro needs to return strings with document names separated with commas:
WHERE condition: DocumentName IN ('Test', 'Lorem', 'Ipsum')

or (and I suggest you the following one)

you don't need to implement your own custom macro and you can write another SELECT into IN function, which selects you document names from your document tree:
WHERE condition: DocumentName IN (SELECT DocumentName FROM View_CMS_Tree_Joined WHERE SiteName = 'CorporateSite')

Best regards,
Jan Hermann