Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Cascading search filters with macros and nested queries View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
bsingh-visualantidote - 12/11/2013 8:37:01 AM
   
Cascading search filters with macros and nested queries
Hi there,

I am working on smart search filter. I have two cascading filters for Kentico categories , one for parent category and other one is for child category.
Requirement- Parent dropdown populates with query and an items needs to be selected with an extra query parameter using where clause and then child dropdown should be populated on the basis of element selected in parent dropdown.

I am pretty much familiar with macros how it works with query string . But the problem is i am not able to use the where clause in a proper way because I am using query parameter somewhere in nested query because querystring parameter added with a column (;) that breaks the sql query structure.

Any help much appreciated


Thanks,
Balinder


User avatar
Certified Developer v7
Certified  Developer v7
bsingh-visualantidote - 12/11/2013 2:02:48 PM
   
RE:Cascading search filters with macros and nested queries
Hi guys,
I got everything working on page load but as soon as i select another value it adds (;)
with query parameter value in where clause . how can I escape from ; in where clause as i am using nested macros in smart search where clause.

Thanks,
Balinder

User avatar
Kentico Support
Kentico Support
kentico_romank - 12/23/2013 3:35:12 AM
   
RE:Cascading search filters with macros and nested queries
Hi,

Could you please try to use something like this:
{%"blah;blah"|(regexreplace);(with) %}
This macro should replace all your ";" in where condition with a space.

Best Regards,
Roman Konicek

User avatar
Certified Developer v7
Certified  Developer v7
bsingh-visualantidote - 12/24/2013 7:47:03 AM
   
RE:Cascading search filters with macros and nested queries
Hi Roman ,

I got it working by using resolve and trimend
{%par%}|(resolve)|(trimend);|


Thanks for the response.

Regards,
Balinder