Sign Up

Hey, Dev!
Are you looking for a forum full of active developers to help you?
So if you want to:
➡️ Get answers for your development issues
➡️ Help others
➡️ Write an article
➡️ Get rewarded for your active participation
Then you are going to love this place.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

OrclQA.Com

OrclQA.Com Logo OrclQA.Com Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Blog
  • New Questions
  • Tutorials
    • Oracle Apex
    • Python
  • Tags
  • Users
  • Badges & Points
  • About
Home/Questions/Q 3888
In Process
Ankita
Ankita

Ankita

  • 2 Questions
  • 1 Answer
  • 0 Best Answers
  • 30 Points
View Profile
  • 0
AnkitaContributor
Asked: December 2, 20202020-12-02T19:27:26+05:30 2020-12-02T19:27:26+05:30

Put colour in columns particular text based on condition

  • 0

In reports one column there are two values payload and error,i want to heighligh only error with red colour if possible that row as well.How to achieve this in oracle apex

question
  • 4
  • 49
  • 0
  • 0
  • Share
    • Share on Facebook
    • Share on Twitter
Answer

    4 Answers

    1. Vinish

      Vinish

      • 1 Question
      • 422 Answers
      • 40 Best Answers
      • 2k Points
      View Profile
      Vinish Legendary
      2020-12-02T19:37:27+05:30Added an answer on December 2, 2020 at 7:37 pm

      Take one more column in your SQL query to highlight the column. Below is an example:

      Select 
      payload, error,
      case when error = 'INACTIVE' then
      'red'
      else
      ''
      end bgcolor 
      From YourTable;

      Now in the HTML expression of ERROR column, specify the span tag as follows:

      <span style="background-color: #BGCOLOR#;">#ERROR#</span>
      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
    2. Ankita

      Ankita

      • 2 Questions
      • 1 Answer
      • 0 Best Answers
      • 30 Points
      View Profile
      Ankita Contributor
      2020-12-02T20:03:34+05:30Added an answer on December 2, 2020 at 8:03 pm

      Is it possible to show in one column only?because the requirement is such that payload and error should be in same column

       

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
      • Vinish

        Vinish

        • 1 Question
        • 422 Answers
        • 40 Best Answers
        • 2k Points
        View Profile
        Vinish Legendary
        2020-12-03T08:39:49+05:30Replied to answer on December 3, 2020 at 8:39 am

        To show only one column, make the error and bgcolor column as hidden columns. And for payload column specify the HTML expression as following:

        <span>#PAYLOAD#</span><span style="background-color: #BGCOLOR#;">#ERROR#</span>
        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
    3. Timo Herwix

      Timo Herwix

      • Germany
      • 0 Questions
      • 3 Answers
      • 0 Best Answers
      • 38 Points
      View Profile
      Timo Herwix Contributor
      2021-01-17T16:54:26+05:30Added an answer on January 17, 2021 at 4:54 pm

      maybe this solution will help you ->

      https://tm-apex.blogspot.com/2020/08/highlight-cells-based-on-value.html?m=1

      you don‘t need HTML expressions which is very helpful in some cases.

       

       

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask Question
    Write a Post
    • Recent
    • Answers
    • Engr. SM Hasem

      How to insert item data with default IG in IG ...

      • 0 Answers
    • suriya

      how to download multiple view/table data in one excel

      • 1 Answer
    • Engr. SM Hasem

      How to add one column data to another column in ...

      • 11 Answers
    • Bheem

      What is best way to design school time table?

      • 0 Answers
    • Vinish
      Vinish added an answer Below is an example to download the CSV file using… January 25, 2021 at 12:54 pm
    • afzal
      afzal added an answer step 1--- report query like-- select EMPNO, ENAME, JOB, MGR,… January 25, 2021 at 10:14 am
    • Engr. SM Hasem
      Engr. SM Hasem added an answer Thank you so much sir. January 25, 2021 at 9:22 am
    • Vinish
      Vinish added an answer For all rows? It seems you want to compare the… January 25, 2021 at 6:19 am
    • Vinish
      Vinish added an answer Ok, then create a dynamic action on the bill month… January 25, 2021 at 6:17 am

    Recent Blog Posts

    • Vinish

      Pro*C - Connect to Oracle Database

    • Vinish

      Copy URL to Clipboard on Button Click Examples

    • Vinish

      Find When Your Mac Was Last Shutdown

    • Vinish

      Oracle SELECT Statement

    • Vinish

      Python Append List to List Example

    Explore

    • Home
    • Blog
    • New Questions
    • Tutorials
      • Oracle Apex
      • Python
    • Tags
    • Users
    • Badges & Points
    • About

    © 2020 OrclQA.Com. All Rights Reserved. Privacy Policy