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
What's incorrect about the result? Seems like you're trying to show a bullet list of attachements (documents).
What is the data type of ri!attachments?
It is a CDT which has Keys {"Attachment_ID","documentName","attachment"}, & yes I'm trying to show it in bulleted list but its giving like shown in the image
Try not wrapping richTextItem in curly brackets.
Tried that, didn't work.
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() )