Using JSR-170 with a multi-select

Does anyone know the answer to this?

How do you do a JSR Query to match a single value in a content item to items selected in a multi-select?

I have a content item that has a multi-select field and I want to find all of the other content items whose displaytitles match the selected values in the original item. I have a query like this:

select rx:sys_contentid ,rx:sys_revision from rx:btCondition 
where jcr:path like :site_path and rx:displaytitle like :condition_list 
order by rx:displaytitle

Where condition list is the output of this function:

$sys.item.getProperty("rx:bio_conditions").getValues()

This has to have been done before…

Looks like I answered my own question… here’s the code - it’s similar to another example I found on the forum:

#set($condition_list = $sys.item.getProperty("rx:bio_conditions"))
#set($condition_query = "select rx:sys_contentid ,rx:sys_revision from rx:btCondition where jcr:path like :site_path and ")
#set($operator = "")
					
#foreach ($current_condition in $condition_list.getValues())
#set($condition_label = $rx.keyword.getLabel("CSMC_Conditions_Treated", $current_condition.String))
#set($condition_query = $condition_query + $operator + "rx:displaytitle like '" + $rx.keyword.getLabel("CSMC_Conditions_Treated", $current_condition.String) + "'")

#set($operator = " or ")
#end
					
#set($condition_query = $condition_query + " order by rx:displaytitle")
#set($condition_slot_params.query = $condition_query)

## Condition list slot
#slot("btSlotAutoBioCondition" "" "<li>" "  </li>" "" $condition_slot_params)
##End Condition list slot