I've been testing different solutions offered on the forum for this, but no solution worked properly in my case. So, I want to change the format of the Budget Remaining Field in my report based on the value of the Budget Ratio field. The field budget ratio is hidden from the tabular report. I applied the following script in the header to do so:
Budget Remaining is a calculated field and so is Budget Ratio. Budget Remaining is formatted as a currency field, while Budget Ratio is formatted as a numeric field with 2 decimals. I want to set up the following conditions:
If Budget Ratio <= 0.20 then the background color of Budget Remaining should be red.
If Budget Ratio > 0.20 and <= 0.40 then the background color of Budget Remaining should be orange. In any other cases it should be white.
I've tried to adjust codes from the following threads:
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.
Question
Aleksandra
Hello,
I've been testing different solutions offered on the forum for this, but no solution worked properly in my case. So, I want to change the format of the Budget Remaining Field in my report based on the value of the Budget Ratio field. The field budget ratio is hidden from the tabular report. I applied the following script in the header to do so:
<style>
form[action*='[@cbAppKey]'] tr.cbResultSetDataRow td:nth-child(10),
form[action*='[@cbAppKey]'] tr.cbResultSetTableHeader th:nth-child(10)
{
display:none !important;
}
</style>
Budget Remaining is a calculated field and so is Budget Ratio. Budget Remaining is formatted as a currency field, while Budget Ratio is formatted as a numeric field with 2 decimals. I want to set up the following conditions:
If Budget Ratio <= 0.20 then the background color of Budget Remaining should be red.
If Budget Ratio > 0.20 and <= 0.40 then the background color of Budget Remaining should be orange. In any other cases it should be white.
I've tried to adjust codes from the following threads:
Changing cell color based on value of another cell - DataPages - Caspio Community Forums
How to add colors to particular cells in a Tabular Report list? - User JavaScript and CSS Discussions - Caspio Community Forums
Conditionally Format Values In Column Of Tabular Report Based On Values - User JavaScript and CSS Discussions - Caspio Community Forums
I also tried to solve this by customizing codes from the Caspio How to page:
Dynamically Changing the Background of a Results Page Record - Caspio Online Help
But nothing seems to work.
Has anyone on the forum faced something similar and what would be your advice on solving the issue?
Thank you all in advance,
Aleksandra
Link to comment
Share on other sites
3 answers to this question
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.