Dynamic Icons in RichText Fields

Hi All,

I am using this code fragment below as a visual button so that if the user clicks the icon, it toggles between green and red and a true/false value is updated in an interface rule input.  I love it.  However, I am trying to see if I can change the icon itself when true to a different Appian icon - thumbs-up.

The desired behavior is when false, remain as is.  But when true, show icon thumbs-up and color "#32CD32.

Thanks.

 

            a!richTextDisplayField(
              label: "Flag as Emergency",
              labelPosition: "ABOVE",
              value: {
                a!richTextIcon(
                  icon: "exclamation-triangle",
                  link: a!dynamicLink(
                    value: if(ri!isOk, false, true),
                    saveInto: ri!isOk
                  ),
                  color: if(ri!isOk, "#32CD32" ,"NEGATIVE"),
                  size: "LARGE"
                )
              },
              align: "LEFT"
            )

  Discussion posts and replies are publicly visible