search

Home  >  Q&A  >  body text

How to change background color of rows based on page item value in interactive report

Hi everyone, I have a question, In my program, There is a hidden page item and when I click on any row of the order report, Hidden page items use order ID, Than I am changing order details table with page item value.

Everything is fine now, I have the order ID on the page item and I want to change the background color of the row with this value

I mean, for example the page item holds 2, if it holds 2, I want to change the background color of the row with order id 2 on the orders table.

I hope, I hope I explained it to you correctly

P粉588152636P粉588152636486 days ago645

reply all(1)I'll reply

  • P粉692052513

    P粉6920525132023-09-16 09:20:53

    Start with CSS rules:

    tr.highlighted {
      background: orange;
    }

    Then you just select the hidden page item

    document.querySelector("table tr:nth-of-type([item#])").addClass("highlighted");

    reply
    0
  • Cancelreply