Is there a way to use a reusable constant or expression rules instead of char(10) or char(13) function directly in any expression/interface rules?
Example Code:
a!richTextDisplayField( label: "", labelPosition: "COLLAPSED", value: a!richTextItem(text: "Hello " & char(10) &"world") ),
I need to replace Char(10) here with either a constant or expression rule, thanks.
Discussion posts and replies are publicly visible
I think we can use an expression rule and use it as below
a!richTextDisplayField( label: "", labelPosition: "COLLAPSED", value: a!richTextItem(text: "Hello " & rule!newLine() & "world") ),
newLine() expression rule
char(10)
do you mean using the appian function substitute() ?
substitute ( text, find, replace_with )
text: (Text) The string to be modified.
find: (Text) The part of the string that will be replaced.
replace_with: (Text) The replacement substring.
niharika s said:I think we can use an expression rule and use it as below
yes, your suggested code should work. Expression rules don't have to contain very much, as in your example. Out of curiosity, is there a reason you don't want to just have "char(10)" in your code?