I'm trying to filter docs by nodeGuids, so I'm making an 'IN' condition using this string:
Alerts = "d001862c-a51f-4dc7-b1a2-69f1787bde9d|15fab1bf-f727-47bc-b713-8624cf9d86e9|e2626bc5-228c-4567-9ff0-51bc359c16e6"
Then I'm using this macro:
NodeGUID in ('{% Alerts.Replace("|", "','") #%}')
Which returns:
"NodeGUID IN ('d001862c-a51f-4dc7-b1a2-69f1787bde9d'' , ''15fab1bf-f727-47bc-b713-8624cf9d86e9'' , ''e2626bc5-228c-4567-9ff0-51bc359c16e6')"
NOTE the double single quotes in the middle of the string. At first I thought it was a problem with the Replace function, so I tried a double replacement: NodeGUID IN ('{% Alerts.Replace("|", "TEST").Replace("TEST", "', '") #%}') But that gave the same result.
Then I tried making my own custom macro string replacement function. I can see the string is formatted properly when it leaves my custom macro. However, when I interrogate the WhereCondition of the cmsrepeater at this line:
return DataHelper.GetNotEmpty(GetValue("WhereCondition"), repItems.WhereCondition);
The value returned by: GetValue("WhereCondition") has the double single quote thing.
So how do I stop this from happening?