Rich text styled icon failure

I am trialing the software and I am having trouble with styled icons in the rich text field.  The two issues are:

1. The information in the tutorial does not match the Appian software.  If I chose "styled icon"  for the rich text field, there is no "icon" item in the configuration menu as shown in the tutorial. It might be useful if someone updated this, at least it would be less confusing.

2.  The more challenging problem is that if I do attempt to create the styled icon, it only shows the text and not the icon.

I enter this in the editor:

if(

ri!vehicle.availability,

"check",

"remove"

)

According to the tutorial this should show either a checkmark or an "x".  However all this does is show the words: "check" or "remove".

Any suggestions?

Thanks!

  Discussion posts and replies are publicly visible

  • you will have to write following expression. To display icon, the expression should be within a!richTextIcon()

    {
    a!richTextIcon(
    icon: if(

    ri!vehicle.availability,

    "check",

    "remove"

    )

    )


    }

  • It might well be that the version that it is use in the academy is not the latest one, but I would assume that you are doing something wrong. Anyways, if you find an error on the academy, you should address it from there, not in the Appian community.

    The icon goes inside a richTextDisplay field, so you need to have something more like this

      a!richTextDisplayField(
        labelPosition: "ABOVE",
        value: {
          a!richTextIcon(
            icon: "star"
          )
        }
      )

    so if you want to have a condition on the icon, you could do it directly there

    {
      a!richTextDisplayField(
        labelPosition: "ABOVE",
        value: {
          a!richTextIcon(
            icon: if(
              ri!vehicle.availability,
              "check",
              "remove"
            )
          )
        }
      )
    }

    if you are not sure of how those components work, i would suggest that your use the design mode to add the icon and then edit it.