Highlight a row on table or list

I’m looking to highlight a row on a table or list when a field within that row contains the logged in user. Any ideas?

I took a look, I didn’t notice that the dispaly rules had no values for the user :thinking:

The only thing I can think of is to use 2 filter tabs on the table, 1 where you show the user record and the other tab all the other records

1 Like

Exactly why I posted! I expected to see “is logged in User” on display rules but I guess not.

I like your idea though, seems like a decent enough workflow. Although in my case, I’m displaying messages so a filter tab of only the logged in users messages wouldn’t show a complete conversation.

1 Like

Resurrecting another old topic to post a possible solution for others who may be looking to do something similar (because sharing is caring)

This example searches the first column of the table by the string “Cancelled”
You’ll need to insert your Table ID & Table Selector

// highlight row based on cell content
$(document).on('table-render-start.{tableID}', function() {
    setTimeout(rowFinder, 0);
});


function rowFinder() {
    let tableData = $('#x_element_page_152_37 > div.table-responsive.table-outer-wrapper > tb-table-group > div > div > tb-table > div > table > tbody');
    let recordCount = tableData[0].children.length;
    let tableRow = tableData[0].children;
    for (let i = 0; i < recordCount; i++) {
        if (tableRow[i].cells[0].innerText == "Cancelled") {
            $(tableRow[i]).css("background-color", "rgba(255, 0, 0, 0.5)");
        }
    }
}