Add record link to each part of a text string

Hi Appian Community,

I have added into my interface a grid as shown below, which was called from a record type. 

ID     relateTo Column 3 Column 4
001 003/004
002 007/004/005
003 001/002/006
004
005
006
007

This is the code that I wrote for column 2 (relatedTo) but didn't work. I used split () to split each row into an array of text IDs, then trying to add link to each of that ID. 


a!richTextItem(
     text: split(fv!row[recordtype.relatedTo], "|"),
     link:  a!forEach(
              items: split(fv!row[recordtype.relatedTo], "|"),
              expression: a!recordLink(
                                       label: fv!item,
                                       recordType: recordType,
                                       identifier: fv!item,
                                       openLinkIn: "NEW_TAB"
        )

    )

)


I want to add link to each ID in column 2 (ID that related to ID in column 1), so when I click any in that text string, I can be directed to the record for that certain ID. I think the identifier needs to be specific but not sure how to do it.

Thanks for your help, and appologise if the code is confusing...

  Discussion posts and replies are publicly visible