Resource String for Display Text in Search Filter Query

Alistair DeJonge asked on August 17, 2018 20:11

Is there a way to use a resource string in the query for a smart search filter?

I have:

SELECT '+IsGlobalWinner', 'True', 'Design Awards Global Winner'
from custom_projectProfile
Where IsGlobalWinner = 1
Group By IsGlobalWinner

I would like to replace 'Design Awards Global Winner' with a resource string.

Recent Answers


Richard Smith answered on August 17, 2018 23:14 (last edited on August 18, 2018 01:07)

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on August 18, 2018 01:10

Not sure if i understand your query, but you can try:

select '+IsGlobalWinner', 'True', 
(select top 1 TranslationText  from View_CMS_ResourceString_Joined where stringkey = 'Design Awards Global Winner' and culturecode = 'en-ca')
from  ...

You might as well try to return {$stringKey$} to see if cms resolve it, i.e:

select '+IsGlobalWinner', 'True', '{$stringKey$}'
from ...
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.