Jump to content

Search the Community

Showing results for tags 'change color'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 2 results

  1. Hello all, I have been putting together a simple pivot table view to display outcomes and percentages of an audit process that we perform which looks something like below; I would like to conditionally format the "% Correct" columns so that they are Green if = 100% or Red if < 100% I have found this a bit difficult as there do not appear to be any Element ID's associated with the cells, I got the result below by using Class Name and column No; Using this code deployed in the footer; <script> function f_color(){ if('[@calcfield:11]' == '100 %') { document.getElementsByClassName('cbResultSetData cbResultSetTableCellNumberDate cbResultSetCalculatedField') [3].style.backgroundColor="green"; document.getElementsByClassName('cbResultSetData cbResultSetTableCellNumberDate cbResultSetCalculatedField') [3].style.color="white"; }else{document.getElementsByClassName('cbResultSetData cbResultSetTableCellNumberDate cbResultSetCalculatedField') [3].style.backgroundColor="red"; document.getElementsByClassName('cbResultSetData cbResultSetTableCellNumberDate cbResultSetCalculatedField') [3].style.color="white"; } } f_color(); </script> However it doesn't switch to green when the field is = 100% (see below I assume this is because the calculated field I am referencing is either the incorrect syntax or can't be used in this way ) and as you can see doesn't apply to all cells in the respective column; Any suggestions or guidance would be gratefully received as I am probably going in completely the wrong direction and I have searched the forums and can find a number of suggestions/solutions for Tabular reports but nothing for Pivot Table reports. Kind regards, Roosta
  2. Hi there, I have tabbed content on my page. One of which looks like this: <li><a data-toggle="tab" href="#menu4" style="background-color: #10368F; color: white;">5. TEST RESULT</a></li> I'd like to change the background color of this element to grey IF my dropdown (named [@Expected_Outcome]) equals Business Insight. I know I can probably figure this out, but my brain is turning to mush from looking at this and I have a deadline looming!! Can anyone help me write the correct script? Many thanks Nikki
  • Create New...