Jump to content

Change Background color for Calculated Field based on value


Recommended Posts

Hello,

Have a problem that I haven't seen in the forums or Online help.  Is there a way to conditionally change the background color for a calculated row of values. 

 

Specifically, I have a table that has a calculated row for each number series.  I want to conditionally change the background color when the row >= 100%.  I've seen solutions for regular rows but not a calculated row and how to adjust its formatting.

FormatCalcRow.png

Link to post
Share on other sites
  • 11 months later...

Hello everyone! You can add a javascript for this wherein if the value is 100 it will change color. You can check this HowTo link for more information. https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-dynamically-change-the-background-of-a-results-page/ 

<script>
var isi = document.getElementById("visi[@field:UniqueFieldName]");
if('[@Yes/No FieldName]' == 'Yes'){
isi.parentNode.parentNode.style.backgroundColor = '#YesColor';
}
else{
isi.parentNode.parentNode.style.backgroundColor = '#NoColor';
}
</script>
Link to post
Share on other sites
  • 2 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...