How to highlight a cell IR report based on a value in another column?

I used the code below and the cell is highlighted for all use column formatting css #COLTOHIGHLIGHT #add to pageBut what I need is if the HIDDENCOL is 'OUT' value and Custom2 should apply if the HIDDENCOL has value 'IN' then custom1 should apply. How to do? Please help thanks loly

Sinduja Sivasailam wrote:

Thank you for your contributions. I understand the concern.

As suggested, I've reproduced the problem in the environment of the APEX.

Thanks for making the effort. I suggest the following approach, which is more flexible and allows a more efficient use of the separation of concerns as above. I created an example on a new page to illustrate this.

1. change the report query to

select
    jan
  , feb
  , mar
  , jan_st
  , feb_st
  , mar_st
from
    project_status

2. in the report, set the month columns to display text and status columns to be hidden.

3. set the property Expression of HTML for each column of months to use a HTML data attribute to include metadata status as well as the displayed value:

#JAN#

4. create a dynamic action after Refresh on the IR region to retrieve the status of project code in the columns of months and apply it as a class to the cell of report element:

Event: After refresh

Selection type: Region

Region:

Real Actions

Sequence: 10

Action: Run the JavaScript Code

Fire on Page load: Yes

Code

$('.a-IRR-table td [data-prj-status]').each(function () {
  var x = $(this);
  x.parent().addClass(x.data('prjStatus'));
});

5 Add a style sheet to the page of Inline CSS property with a rule to set the background color of cell as required for each State of the project:

.a-IRR-table tr:hover td {
  opacity: 0.7;
  transition: opacity .1s
}
.a-IRR-table td.REQ,
.a-IRR-table tr:hover td.REQ {
  background-color: #ff9;
}
.a-IRR-table td.INP,
.a-IRR-table tr:hover td.INP {
  background-color: #cf9;
}
.a-IRR-table td.YTS,
.a-IRR-table tr:hover td.YTS {
  background-color: #ccf;
}
.a-IRR-table td.CR,
.a-IRR-table tr:hover td.CR {
  background-color: #f66;
}
.a-IRR-table td.COM,
.a-IRR-table tr:hover td.COM {
  background-color: #9cf;
}

Tags: Database

Similar Questions

  • Interactive report, change in color of the text based on the value in another column

    I have a sample report at this url:

    workspace: homeworld

    username: test_report

    password: test_report

    APEX version 4.2.3 database 11 g release 2...

    # Application: 202: IR TEST REPORTS

    Page in question is #2 page

    I have the setup of the report and you must make the following change...

    I have 2 columns: Comm and bonus.

    If the bonus > comm, I need to change the text color of the color of the Red bonus

    If the bonus, comm, I need to change the text color of the bonus in green color

    If the bonus = comm, I need to change the text color of the bonus to black color

    I tried using the code with the select and am NOT wanting that, since he will be delivered with the data when they are downloaded in CSV or Excel... Had thought using the construction by highlighting, but that does not compare one column to another...

    Thought a dynamic action, but not clear on HOW to do this, so any help would be appreciated...

    Thank you

    Tony Miller

    Software LuvMuffin

    Hello

    I think that number with JavaScript conversion may not be good idea because it's difficult manipulating different digital formats.

    Check your example on page 3.

    I have added to the report query

    CASE WHEN COALESCE(bonus,0) > COALESCE(comm,0) THEN
     'red'
    WHEN COALESCE(bonus,0) < COALESCE(comm,0) THEN
     'green'
    WHEN COALESCE(bonus,0) = COALESCE(comm,0) THEN
     '#333333'
    END as fcolor
    

    Then I modify every column Expression HTML to be as

    #EMPNO#
    

    Kind regards
    Jari

  • How to merge values into a line, based on distinct values in another column

    I have a table like

    updatedby updateddate text
    Approval John 1st May 2009 1 added file
    Approval of John 1 May 2009 2 added file
    May 2, 2009 1 deleted David approval form

    I need the text column values to be concatenated and displayed for unique (updatedby updateddate) records. The output is something like

    updatedby updateddate text
    Approval of May 1, 2009 John save further approval 1 sheet, 2 added
    May 2, 2009 1 deleted David approval form

    I had planned to do it using PLSQL. Is there a way to achieve this in SQl...? Please suggest
    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 'John' as updatedby, to_date('01-May-2009','DD-MON-YYYY') as updateddate, 'Approval record 1 added' as text from dual union all
      2             select 'John', to_date('01-May-2009','DD-MON-YYYY'), 'Approval record 2 added' from dual union all
      3             select 'David', to_date('02-May-2009','DD-MON-YYYY'), 'Approval record 1 removed' from dual)
      4  -- END OF SAMPLE DATA
      5  --
      6  select updatedby, updateddate, ltrim(sys_connect_by_path(text,','),',') as text
      7  from (
      8    select updatedby, updateddate, text, row_number() over (partition by updatedby, updateddate order by text) as rn
      9    from t
     10    )
     11  where connect_by_isleaf = 1
     12  connect by rn = prior rn+1 and updatedby = prior updatedby and updateddate = prior updateddate
     13  start with rn = 1
     14* order by 2
    SQL> /
    
    UPDAT UPDATEDDA TEXT
    ----- --------- ----------------------------------------------------------------------------------------------------
    John  01-MAY-09 Approval record 1 added,Approval record 2 added
    David 02-MAY-09 Approval record 1 removed
    
    SQL>
    

    Edited by: BluShadow May 21, 2009 12:37
    Argh! hair to the pole by SY

  • Getting the value of a column based on the value of another column in a max group

    Please let me know if there is a simple way to do it.  I came up with a way, but it is terribly inefficient and it must work quickly.

    GROUP_ID NO_REGISTRE READ_VALUE QUARTERLY

    ---------- ----------- ---------- -----------------------------

    2 1 0.035 00:00:00.000000000 01/01/2015

    2 0.035

    3 1 1.11 14:50:32.943000000 14/07/2015

    3 2 222 01/01/0001 13:36:47.017436000

    3 223.11

    So what I need is for all no_registre is NULL, I need the value of QUARTERLY for the QUARTERLY to the MAX (READ_VALUE) for this GROUP_ID (not counting the rows where the no_registre is NULL).  So the result would look like this:


    GROUP_ID NO_REGISTRE READ_VALUE QUARTERLY

    ---------- ----------- ---------- -----------------------------

    2 1 0.035 00:00:00.000000000 01/01/2015

    2 0.035 00:00:00.000000000 01/01/2015

    3 1 1.11 14:50:32.943000000 14/07/2015

    3 2 222 01/01/0001 13:36:47.017436000

    3 223.11 13:36:47.017436000 01/01/01

    Someone at - it ideas?

    Or maybe:

    -production of the sample data:

    WITH t (GROUP_ID, no_registre, READ_VALUE, QUARTERLY)

    AS LONG AS)

    SELECT 2, 1, 0.035, TIMESTAMP ' 2015-1-1 00:00:00 ' FROM DUAL

    UNION ALL SELECT 2, NULL, 0.035, THE DOUBLE NULL

    UNION ALL SELECT 3, 1, 1.11, TIMESTAMP ' 2015-07-14 14:50:32 ' FROM DUAL

    UNION ALL SELECT 3, 2, 222, TIMESTAMP ' 0001-1-1-13:36:47 ' FROM DUAL

    UNION 3 SELECT ALL, NULL, 223.11, NULL FROM DUAL

    )

    --

    -actual query:

    --

    Select group_id

    no_registre

    read_value

    , last_value (quarterly) ignores NULL values over (partition by arrested by no_registre last read_value null, group_id) quarterly

    t;

  • How to highlight the line of the ADF table based on the value of the column?

    Hi all

    I use jdev 10.1.3.4. I want to highlight a table row or a cell based on the value of the column.

    Lets say, I have a table emp with column empid, empname and sal. I want to emphasize the lines that have sal = 10000.

    How can I achieve this? Please help me with this.

    Thank you
    Abhijit

    Hello

    You want to highlight the lines? or set a different color for the lines? If it's the second, you can set the inline style based on the salary. (+ Edit: well, never mind, both are same :)) +)

    Something like

    
    

    If you want the entire line to be a different color, you have 2 options.

    1. define the same style inline for all columns in the table (good if you want to do only for a single table).
    2. create a style class and apply the styleclass based on the value of sal (preferably if you want the same behavior in all of your application).

    Arun-

    Published by: joel Ramamoorthy, October 23, 2009 16:56

  • Highlight the line in the standard State is based on the value in the column...

    I'm trying to highlight the lines of a standard report based on the value of the TICKET_TYPE column.

    I followed the post: highlighted a line in a tabular form based on a column in the row

    but the difficulty. I have the following error:

    ORA-06550: line 1, column 34: PLS-00201: identifier 'SHRIMP' must be declared ORA-06550: line 1, column 7: PL/SQL: statement ignored

    ERR-1025 expression PLSQL treatment error. SHRIMP = "SHRIMP".




    My report query is:

    Select T.TRIP_ID,
    T.TRIP_ID trip_show,
    T.TRIP_ID trip_select,
    T.DAYS_AT_SEA,
    T.NBR_OF_CREW,
    T.TRIP_START_DATE,
    T.VESSEL_ID,
    o.ticket_type ticket_type
    TRAVEL t, o one_ticket_type
    where t.dea_permit_id =: G_DEA_PERMIT_ID and t.trip_id = o.trip_id

    I created a new template called a ticket-enhancement.

    line 1 = tempate < td #ALIGNMENT headers # = "" #COLUMN_HEADER # "class ="t14data"style =" background: red "> #COLUMN_VALUE # < table >"
    model condition rank 1 = use based on the expression of pl/sql
    template expression rank 1 = #TICKET_TYPE # = "SHRIMP" (* I also tried without the quote)


    any thoughts? Thank you!!

    Edited by: KEH813 may 25, 2010 11:10

    I'm not sure of the JavaScript. Whenever you sort the report, coloring disappears and you can send the page again.

    PS Don't forget to mark the answers as Correct or useful.

    Best regards
    Mathieu Gosselin

  • How to navigate to the next page based on the value returned by the method call inside the action attribute of the command key.

    How to navigate to the next page based on the value returned by the method call inside the action attribute of the command key.

    I use JDeveloper 12.1.2.0.0

    < af:button id = "tt_b2".

    rendered = "#{attrs.nextRendered} '"

    partialSubmit = 'true '.

    action = "#{attrs.backingBean.nextAction} '"

    Text = "next".

    Disabled = "#{attrs.nextDisabled}" / >

    private static final String NEXT_NAVIGATION_ACTION = "controllerContext.currentViewPort.taskFlowContext.trainModel.getNext";

    public String nextAction() {}

    If (validate()) {}

    updateModel();

    Return NEXT_NAVIGATION_ACTION;

    }

    Returns a null value.

    }

    Use case is made for model train, which is being implemented based on this blog: http://javacollectibles.blogspot.co.UK/2014/10/ADF-train-template.html

    We define a generic action following in the model, but the action must be called under certain conditions, based on the question of whether all validation controls had been passed on no.

    You can do this in two ways:

    1 returnValue = (String) ADFUtils.invokeEL("#{controllerContext.currentViewPort.taskFlowContext.trainModel.getNext}");

    return returnValue;

    2.

    public String getNextTrainStop() {}

    String nextStopAction = null;

    ControllerContext controllerContext = ControllerContext.getInstance ();

    ViewPortContext currentViewPortCtx = controllerContext.getCurrentViewPort ();

    TaskFlowContext taskFlowCtx = currentViewPortCtx.getTaskFlowContext ();

    TaskFlowTrainModel taskFlowTrainModel = taskFlowCtx.getTaskFlowTrainModel ();

    TaskFlowTrainStopModel currentStop = taskFlowTrainModel.getCurrentStop ();

    Terminus of TaskFlowTrainStopModel = taskFlowTrainModel.getNextStop (currentStop);

    nextStopAction = nextStop.getOutcome ();

    _logger.fine ("train, next stop:"+ nextStopAction ");

    Return nextStopAction;

    }

  • How to disable a page based on the value of another element on the Page element?

    Hello

    How can I turn a page element using javascript based on the value of another element on the page?

    Eg: P1_TEXT want to be disabled if the value in P1_LCOK = "LOCK".

    How can I do this using javascript. I want this implemt on loading the page.

    Kind regards
    Benz

    Put this function in the page header:

    
    

    and call it in the footer:

    f_disable_item;
    

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • Column sum based on a single value of another column

    Hi all

    I've searched and searched, but just can't find if this is even possible, let alone how to do it.  What I'm trying to do, it's the sum of a column.  However, only summarize the results of this column if a specific value of another column is present.  So, for example, the following is a sample database entry:

    Rate of pay hours

    2.3                                  $14.00

    1.2                                  $14.00

    2.4                                  $12.50

    0.75                                $12.50

    So for that, I want the sum of hours worked column but only the sum of hours worked if the wage rate is $14.00 and $ 12.50.  Because these numbers are generated in a database (with the various people who enter multiple rates of pay), I won't be able to set the where statement to have a specific amount (since I don't know the specific amount each registrant), the amount must be a variable in the where the statement.  With MySQLI, I know not how to make the sum of hours worked, but I do not know how the sum of hours worked if and only if the line corresponds to the unique value in the rate column.

    Then have it automatically loop through and total hours worked for other unique values in the column salary rate.  Finally, out all unique values in the column rate in variables so that I can do the following for each game:

    $total1 = $total_hours1 * $wage_rate1
    $total2 = $total_hours2 * $wage_rate2
    $overall_total = $total1 + $total2
    

    where $wage_rate1 = $14.00 and $total_hours1 = 2.3 + 1.2: etc.

    Is it still possible?  If so, how?  If possible, can someone please let me know a good reference so I can learn how to be the best way to implement?

    Thank you

    So with that, I get the correct $final_total printed, but I still get the error, 'notice: Undefined variable: final_total. Why is it not defined, but prints the total exact? How to remove the error?

    You get this notice is because you use the assignment combined, operator that is normally used to add a value to a variable and assign the new value to it.

    $final_total += $total;

    is a shortcut for this:

    $final_total = $final_total + $total;

    The undefined $final_total is on the right side of the assignment operator. The first time through the loop, you add $total to a non-existent value. Because of the type of PHP juggling, this becomes:

    $final_total = 0 + $total;

    The next time the loop runs, $final_total has a value, so that you get the view variable not defined only once.

    To avoid advice, initialize $final_total to zero before the start of the loop.

    $final_total = 0;

    While ($row = {$sql-> fetch_array())}

  • Change the Label element based on the value of another element

    Hi guys,.

    I need to put a label of point (A) based on the value of another article (B). I did the following:
    I created a dynamic action.
    When B changes:
    1. present the value of B
    Article 2-updated
    Is element A label: myitem & b.

    Any ideas?

    Best regards
    Fateh

    His work! Check it out now

    Just do it

    $('#mylabel').children('label').children('span').text($v('P1_A'));
    

    Published by: VC on June 9, 2012 11:21

  • Fill a field value based on the value of another field

    Hello
    Could someone tell me what is the problem with the following select statement. For a group of records, trying to fill a field with a value based on the value in another field (problem of status), but the Group of records appears empty just when I put this code in the field.
    Any help would be appreciated
    Thank you


    <? choose:? >
    <? When: IssueStatus = "Open"? >
    <? 1? >
    <? end when? >
    <? otherwise:? >
    <? When: IssueStatus = "closed"? >
    <? 2? >
    <? end when? >
    <? otherwise:? >
    <? When: IssueStatus = "Unresolveable? >
    <? 3? >
    <? end when? >
    <? end otherwise? >
    <? end to choose? >

    Use the following syntax.

    
    
    Display 1
    
    
    Display 2
    
    
    Display 3
    
    
    
  • Highlight conditional in standard report based on a column - endangered

    Hi all

    I've implemented a conditional formatting on a standard report based on the thread below

    Highlighting a row in a tabular form, based on a column in the row

    Everything works fine, except when you hover over the report highlighting disappears. It reappears if you refresh the page, or scroll to the next page in the report.

    I use in my style in the model tag
    style = "background: red".

    Is this something to do with the model? I use the theme generator 2.

    Any ideas?
    Andrew

    Hi André,.
    It is in from the report model - before every line:
    Just remove the # if #HIGHLIGHT_ROW you don't need.

    Regards Garry

  • How to format a single cell based on the value in another cell?

    IM using JDEV 11.1.2.4 and had the following use cases.

    based on a threshold value in a column of my line, I want to show a different value in the color red.

    How to get there?

    Hello

    This could be a possible solution using inlineStyle and a simple logic of EL

    inlineStyle = ' #{rank. " TRESHOLD > 10? "{" color: #990000 ': "color: #000000 '} '.

    ID = "ot1" / >

    Marc

  • Derivative of a cell based on the value of another cell's true/false

    Hello

    I try to create a list of digital control and would have put cells highlight according to a corresponding value in another cell.

    For example, I would like cell D2 to white if the cell H2 is FALSE, or if the values of H2 is TRUE, I would D2 to be green. I want this for about 20 lines.

    Any suggestions?

    Hi JCR.

    Conditional highlighting rules depend on comparing the value contained in the cell to be highlighted (D2) with a second value. The second value may be fixed (recorded in the rule) or may be contained in a cell of the second.

    In your scenario, the highlight would be independent of the value in D2.

    There are two ways to accomplish what you want using conditional highlighting, highlighting a third cell whose value depends on the value in H2 and whose pointing out will be seen as highlighting of the D2, OR by providing a third cell whose value can match or does not match the value in D2 , the value of H2.

    Since you want to highlight only a single cell, and not a group of cells, the second method is probably more simple here.

    Each cell in the column I contains the following formula, entered in I2, and filled then down on the rest of the column:

    I2: = IF (H, D, "xxx")

    English: If the cell in this row of column H is set to TRUE (enabled), copy the value in this row of column D to this cell. If not, put "xxx" in this cell.

    'xxx' can be any value that will be ever present in the cells in column D.

    The below table conditional formatting rule is placed in cells D2 - D10. The cell reference is to the cell "this rank" in column I and is different for each cell.

    Kind regards

    Barry

Maybe you are looking for