Question
· Apr 25, 2023

How to escape ')#' inside a CSP Runtime Expression?

I have a csp page that is using embedded Runtime Expression (https://docs.intersystems.com/ens201817/csp/docbook/Doc.View.cls?KEY=RCS...) and within that expression I am using a $data() modulo 2 to look for root-level data elements (https://docs.intersystems.com/ens201817/csp/docbook/Doc.View.cls?KEY=RCO...).

E.g:

#($select($data(^ImportantFlag)#2:"Important!",1:"Normal"))#

However, my modulo sign (#) after the $data() call is seen as the ending tag for the runtime expression resulting in a broken compilation.

Does anyone know if there is a way to escape )# or just # in a CSP Runtime Expression?  Or do I need to abandon the elegance of the approach and actually check for a return value of 1 or 11 to ensure top level data?  

Product version: IRIS 2022.1
Discussion (3)2
Log in or sign up to continue