raw
To return the internal raw text representation of a given value
You can use this function to convert a value to the system's internal text representation. For example, you can convert rich text to unformatted text with HTML tags or read the hexadecimal code of color.
Afterward, the result can be formatted again with the html()
function.
This is very useful when, for example, you display data fields of type "Text (formatted)" with the appropriate formatting in dialogs or emails.
Syntax
raw(any)
Return
string
Examples
raw('My sample text')
Result: Returns the content of the formatted (e.g. field type Text (multiline)) text field "My sample text" as unformatted text with HTML tags.
dialog("Hello", raw('Dialog text'), ["Yes", "No"])
Result: Displays a dialog box with the heading "Hello" and the contents of the formatted text field "Dialog text" and the buttons "Yes" and "No."
raw(Color)
Result: #EC87E2
When Pink is selected in the Color field.
You can find another example on the page for the createTextFile
function.
See also
html
, which returns a rich text representation of any value.