Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Using ##COLUMNS## with Smart Search Filter Query View modes: 
User avatar
Member
Member
rlull - 11/11/2013 12:22:41 PM
   
Using ##COLUMNS## with Smart Search Filter Query
I'm specifying a custom query within the Smart search filter web part and need to use the ##COLUMNS## macro but don't see a place for it like in the Query web part. Is there still a way to use this macro within the Smart search filter?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 11/12/2013 3:25:35 AM
   
RE:Using ##COLUMNS## with Smart Search Filter Query
Hello.

The Smart Search Filter web part (~\CMSWebParts\SmartSearch\SearchFilter.ascx.cs) by default calls the method
DataSet ds = ConnectionHelper.ExecuteQuery(FilterQueryName, null, FilterWhere, FilterOrderBy);

so the columns list is not passed to the query. You could maybe clone the default web part and in the codefile, call the other overload of the ExecuteQuery method, which includes Top N and Columns parameters.

Hope this will help.

Regards,
Zdenek

User avatar
Member
Member
rlull - 11/12/2013 10:04:37 AM
   
RE:Using ##COLUMNS## with Smart Search Filter Query
Thanks for your reply. What I ended up doing, so that I could preserve the ability to pass in variables from the querystring, was placing the entire query in the "where" condition of the web part which then gets passed to a custom query that only contains ##WHERE##. Kind of a hack but a viable workaround nonetheless.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 11/12/2013 10:46:39 AM
   
RE:Using ##COLUMNS## with Smart Search Filter Query
If the columns property is not available in that webpart, I suggest making a copy of it and adding it. Simplest and fastest way to get what you need without a hack that someone might have to try to figure out later.

I've found several webparts with properties defined in code but not defined in the UI. You might check that as well, could be a simple change.

User avatar
Member
Member
burdak.suresh-gmail - 1/30/2014 7:51:15 AM
   
RE:Using ##COLUMNS## with Smart Search Filter Query
Hello Mr. Perfect,

I need your help to know about the below code during using Kentico CMS:
 QueryDataParameters parameters = new QueryDataParameters();
parameters.Add("@userID", userID);

DataSet ds = ConnectionHelper.ExecuteQuery("CMS.User.GetMyExperts", parameters);

I want to know that Where the Query "CMS.User.GetMyExperts" is defined????
I want to know that What is there is this sql query??? so I that i can see the query results.
I really confused in this because I am new to kentico CMS, and I am working on maintenance of a project.

Pleas help me. Looking forward to hear from you.