Use richTextBulletedList with Foreach on CDT

Certified Associate Developer

I want to use richTextBulletedList with Foreach on CDT type item, but Appian is giving incorrect result. Below is the code & image attached.


a!richTextDisplayField(
                label:"Attachment",
                value: a!richTextBulletedList(
                  items: if(
                    rule!CMN_PLATTS_CheckNullOrEmpty(
                      ri!attachments
                    ),
                    cons!CMN_PLATTS_TXT_NOT_AVAILABLE,
                    a!forEach(
                      items: ri!attachments,
                      expression: {
                        a!richTextItem(
                          text: " " & index(fv!item, "documentName", null),
                          link: rule!CMN_PLATTS_SEC_AWS_GetDocumentLink(
                            filePath: index(fv!item, "attachment", null),
                            documentDetails: fv!item
                          ),
                          linkStyle: "STANDALONE"
                        )
                        & char(10)
                      }
                    )
                  )
                ),
                preventWrapping: true()
              )

  Discussion posts and replies are publicly visible

Parents Reply Children
  • +1
    Certified Lead Developer
    in reply to tabishriaz

    Remove the extra & char(10) that you are concatenating after.

    a!richTextDisplayField(
      label: "Attachment",
      value: a!richTextBulletedList(
        items: if(
          rule!CMN_PLATTS_CheckNullOrEmpty(ri!attachments),
          cons!CMN_PLATTS_TXT_NOT_AVAILABLE,
          a!forEach(
            items: ri!attachments,
            expression: a!richTextItem(
              text: " " & index(fv!item, "documentName", null),
              link: rule!CMN_PLATTS_SEC_AWS_GetDocumentLink(
                filePath: index(fv!item, "attachment", null),
                documentDetails: fv!item
              ),
              linkStyle: "STANDALONE"
            )
          )
        )
      ),
      preventWrapping: true()
    )