This document will help you to make a field clickable when using REST API connection with the table element.



  1. Insert Table element from ShortPoint Page Builder.

  2. Use REST API connection to connect to your SharePoint list.

  3. Click connect, then check fields names in the data example as per the figure below

  4. Enable advanced settings

  5. Paste this code inside "Map Results" field:

    var cilckableField="example1";
    var linkedTo="example2";
    var resultItems = [];
    shortpoint.$.each(data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results, function () {
        var link = "";
        var row=this;
        shortpoint.$.each(row.Cells.results, function () {
            if (this.Key == cilckableField) {
                var cell=this;
                link = cell.Value;
                console.log(link);
                shortpoint.$.each(row.Cells.results, function () {
                    var subCell=this;
                    if (this.Key == linkedTo && link) {
                        this.Value = '<a target="_blank" href="' + link + '" >' + subCell.Value + '</a>';
                    }
                });
            }
        });
    });
    shortpoint.$.each(data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results, function () {
        resultItems.push({});
        shortpoint.$.each(this.Cells.results, function () {
            resultItems[resultItems.length - 1][this.Key] = this.Value;
        });
    });
    return resultItems;
  6. Replace "example1" with the column name you want it to be clickable.

  7. Replace "example2" with the column name that contains the URLs

  8. Click Insert