Question about SAIL grids: We're looking to move our current Portal-based ap

Question about SAIL grids: We're looking to move our current Portal-based apps to Tempo (SAIL)-based apps, and one current bit of functionality we have is that on task forms and pages, we use the ncolumntable() function to display data from a CDT. One of the columns in the CDT sometimes has hyperlinks, but not always. So, the question is, is it possible within a SAIL grid to have one column that is populated with data from a CDT, that, based on the data in the CDT, displays the data as a link when it is, but just normal text when it isn't. Currently, the CDT data has fully-formed html for those data which should be links, e.g <a href='the uri'>link text</a> and just normal text strings for those data which shouldn't be links....

OriginalPostID-105751

OriginalPostID-105751

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    I think this can be achieved. In a!gridTextColumn you can define your link items using an apply statement to iterate over the CDT and create the links. The clever bit you need is that when your CDT row contains a URL you return the a!safeLink component (you will have to use a further expression to extract the URL from your string), if the value is null you instead return the a!dynamicLink(value: null) component. It will still display as a hyperlink field in the grid but on click nothing will happen. I cannot see a way of suppressing the actual display of a link but this method will prevent an empty page from loading on click of the link.