Auto Slot query LIKE Parameter

Hello All,

Can we do this for an autoslot query

select rx:sys_contentid from rx:propertyValues where rx:location like %:displaytitle%

I have a propertyValues content type and a field called location in it. We generally fill the location to be “Arlington, Fairfax, Washington” etc. We have another content type with display title as “Fairfax”. For this content type, in the page template I am trying to return all the propertyValues content items which have FairFax in the location.

This would be eay if content managers enter only one value in the location field. But they generally enter multiple values seperated by “,”. When I use the above SQL query for the autoslot I dont get any results back. Instead of like %:displaytitle%, if I use like %Fairfax%, everything works. Is ther a way to pass binding value to operate within the constraints of Like parameter.

Ravi, I hope you understand your question correctly. You can pass anything you like to your autoslot query as a parameter, like so:
[SIZE=2]#slot[/SIZE]([SIZE=2]"<your slot name>"[/SIZE] [SIZE=2]""[/SIZE] [SIZE=2]""[/SIZE] [SIZE=2]""[/SIZE] [SIZE=2]""[/SIZE] [SIZE=2]"template=<your snippet template>&myLocationString=[/SIZE][SIZE=2]$sys.item.getProperty(“displaytitle”))[/SIZE]

Then, in your autoslot query, do something like this:
SELECT rx:sys_contentid, rx:sys_contentstartdate FROM rx:<your content type> where rx:location like ‘%:myLocationString%’

We are doing a bit of this sort of thing in our implementation and it works well for us.

Thanks