Hi Team,
I have a rich text editor in my interface and its value is saved as "text" in DB with all the tags (that includes bullets, colors, background color, highlight etc ).
I want to extract only the text part of the data.
How can I do this?
Like if the value is saved as "<div>Assigned to <em style="color: rgb(0, 71, 178);">XYZ</em></div>" , I only want "Assigned to XYZ".
striphtml() function throws error.
Appian version 21.1
Discussion posts and replies are publicly visible
Your example works flawless with striphtml().
Why do you use a richtextfield in the first place?
Hi Stefan,We have to give the privilege to the users to write comments. Comments can be in form of bulleted list, numbered list, bold characters at places and anything else that the user feels is important.
When I use striphtml("<div>Assigned to <em style="color: rgb(0, 71, 178);">XYZ</em></div>") in Expression rule I get the below error : Expression evaluation error: Syntax error. Details: Expression evaluation error at function 'striphtml' parameter 2 [line 70]: The Target is missing.Also the value will be extracted from DB table using a!queryentity.
If you're constructing your expression rule literally as:
then, yes, you'll get a syntax error as the expression editor is trying to parse all of the quote characters and failing.
If you pass the value into your expression in a rule input:
then, as says, it works perfectly.
If you fetch the data using a query as you're suggesting then it'll work fine too.
Thanks Stewart. I will just try this out.