senicholas Posted July 9, 2014 Report Share Posted July 9, 2014 I wish to have the field Dwell_Days background color change to yellow when the value exceeds 7 on my data page. Quote Link to comment Share on other sites More sharing options...
Jan Posted July 11, 2014 Report Share Posted July 11, 2014 Hello senicholas, It seems, that your question is a similar to this one. Does it work for you? Quote Link to comment Share on other sites More sharing options...
senicholas Posted July 14, 2014 Author Report Share Posted July 14, 2014 I saw your earlier discussion, but I cannot get the html block to equal the field Dwell_Day. How do you do that? Quote Link to comment Share on other sites More sharing options...
casGary Posted July 17, 2014 Report Share Posted July 17, 2014 Hello Senicholas, Try to implement it this way: <script> function f_color(){ var myVal = parseInt(document.getElementById('ID').value); if (myVal > 7) { document.getElementById('ID').style.color = "red"; } } document.getElementById('ID').onchange= f_color; </script> Quote Link to comment Share on other sites More sharing options...
Jan Posted September 29, 2014 Report Share Posted September 29, 2014 Hi senicholas, If you use a Report DataPage, I hope the following JavaScript can help: <SCRIPT LANGUAGE="JavaScript"> var elems = document.getElementsByTagName("td"); for (var i=0, m=elems.length; i<m; i++) { if (elems[i].innerHTML>7) { elems[i].style.color="red";} } </SCRIPT> The code checks all valaues and make the color "red", if the value is more than 7. Quote Link to comment Share on other sites More sharing options...
senicholas Posted June 12, 2015 Author Report Share Posted June 12, 2015 How do you restrict it to one field. It works, but looks at all the numbers in the report. The field if F7 Quote Link to comment Share on other sites More sharing options...
Jan Posted June 14, 2015 Report Share Posted June 14, 2015 Hi senicholas, It seems I have answered in another topic. Is it the same question? Quote Link to comment Share on other sites More sharing options...
vanderLeest Posted March 12, 2020 Report Share Posted March 12, 2020 Hi Jan How can I compare two currency fields - set the Display Only on a Report Details Page - and if the Invoiced value is higher than the Budget value, color the text of Invoiced value red and its background yellow? Thanks for your help Quote Link to comment Share on other sites More sharing options...
cheonsa Posted July 31, 2023 Report Share Posted July 31, 2023 Hello! You can create a Calculated field and use Case When Formula to compare the fields. Then, apply a script in the Footer to highlight the column based on the result of the Calculated field. To hide the Calculated field, you can use the code here: Quote Link to comment Share on other sites More sharing options...
IamNatoyThatLovesYou Posted December 31, 2023 Report Share Posted December 31, 2023 Hello Everyone, just sharing this other solution that may help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.