I have a note pushing to people that is Long Text format. So that display is:
<cfoutput>
#maindata#
</cfoutput>
And lets say that data is a bunch of "blah blah blah, and more text data, blah blah" which is outputting properly.
What I am trying to do, is add an additional variable note inside the "LongText"
So in the text data I have tried.
#set.newnote#
I have tried these 2 with no luck either:
#Variables[set.newnote]#
#evaluate(set.newnote)#
I'm not having luck. Is this possible or do I need to break out of the output to add an additional output after.
I assume you're asking this because you want to nest coldfusion string variables inside text stored in a database.
You could do this using a combination of
evaluate()
andde()
like this:...however beware the huge security risks of doing this with any text derived from user input - explained in more detail for example here: https://www.bennadel.com/blog/3861-evaluating-database-records-that-contain-coldfusion-interpolation-expressions-in-adobe-coldfusion-2018.htm
A safer way is to include your own tokens to delimit variables inside DB text, and then use a function to parse these and only output known safe variables.