hardcode values in paragraph field

Certified Associate Developer

Hi, 

I have a paragraph field. I need to hardcode a value, with the below code, the user can change the value. When I used the a!richtextdisplayfield, I was getting an error. 

Can someone pls guide here. 

a!paragraphField(
label: "Rejection Comment",
value: "REJECTION " & local!comment,
saveInto:  local!comment,
)

  Discussion posts and replies are publicly visible

Parents
  • Hi, 
    not sure what you are trying to accomplish. The issue with the above approach is, every time the user is interacting with the field, the word 'Rejection' will be added to the content of the field.

    I see no issue with a rich text display field.

    a!localVariables(
      local!comment,
      {
        a!paragraphField(
          label: "Rejection Comment",
          value: "REJECTION " & local!comment,
          saveInto: local!comment,
          
        ),
        a!richTextDisplayField(
          label: "Rich Text Display Field ",
          value: a!richTextItem(
            text: "REJECTION " & local!comment,
            style: "EMPHASIS",
            size: "MEDIUM_PLUS",
            color: "ACCENT"
          )
        )
      }
    )

Reply
  • Hi, 
    not sure what you are trying to accomplish. The issue with the above approach is, every time the user is interacting with the field, the word 'Rejection' will be added to the content of the field.

    I see no issue with a rich text display field.

    a!localVariables(
      local!comment,
      {
        a!paragraphField(
          label: "Rejection Comment",
          value: "REJECTION " & local!comment,
          saveInto: local!comment,
          
        ),
        a!richTextDisplayField(
          label: "Rich Text Display Field ",
          value: a!richTextItem(
            text: "REJECTION " & local!comment,
            style: "EMPHASIS",
            size: "MEDIUM_PLUS",
            color: "ACCENT"
          )
        )
      }
    )

Children
No Data