0

Is there a way to display link columns in a database table. I was following this but turns out link fields aren't display with a link.

Instead the entire hyperlink is displayed which messes up the look and feel of the table. I added following to the DataTableListView.js but it did not make any changes

else if (ctx.ListSchema.Field[index].Name === "Find_this_Opportunity") {
    cell = "<a href='" + ctx.displayFormUrl + "&ID=" + ctx.CurrentItem.ID +  "'>";
    cell += ctx.CurrentItem[ctx.ListSchema.Field[index].RealFieldName];
    cell += "</a>";
}
1

I finally figured it out. Here is the code that works.

    else if (ctx.ListSchema.Field[index].Name === "Find_this_Opportunity") {
        var OpportunityUrl = ctx.CurrentItem["Find_this_Opportunity"]
        var OpportunityDesc = ctx.CurrentItem["Find_this_Opportunity.desc"]         
        cell = '<a href="'+OpportunityUrl+'">'+OpportunityDesc+'</a>';
    }
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.