Change column bg-color according to the values in this column.
Version of the apex is 4.2.4
To keep it short, I want the background of one of my field to be red when it is NULL, when there are data in it, I want it to be green.
The first is what it looks currently, second photo, that's how I want it to look!
Option
Use the column layout features.
It is a bit of a hack, but it works well.
1. Add a column to your query that contains the logic for your choice of color.
decode (department_id, 30, 'BLUE', 'RED') AS DEPT_COLOR
2 - cut the column in the report properties - so it does not appear.
3 - update the column in question-> column-> Expression HTML formatting
Add the desired HTML logic.
Ex:
Now it works OK for some styles and formatting - but the DIV in a table cell is kind of a weird look.
Option
Create a report model that put this condition of the column in place. To create a column a different color, you will need to use a level line model.
Option
Put in a bit of jQuery with option 1.
-Create a class that you can button
#DEPARTMENT_ID #.
-Create a region on the bottom of the page
$(".find_me_RED").parent().css("background-color","RED");
$(".find_me_BLUE").parent().css("background-color","BLUE");
Note: This will not work if you are using one of the reports that have the '' mouse highlighting. ''
Tags: Database
Similar Questions
-
Dynamically change color according to the value of the field field
I hope someone can help with my problem, I have not dealt with Java Script before please bare with me as I try to explain. I tried searching everywhere for the answer but am getting lost a bit in some answers just so I was wondering if anyone on the forum can help.
I am trying to create a reliable PDF form for a risk assessment. The user in the columns of the severity and probability input values and the value is generated automatically in the column risk classification. So I managed to get the number of risk rating to calculate automatically using the option calculate and select the value is the product of "Severity1", Likelihood1 It's great, so now I want to the field of evaluation may change the background color based on the value as follows:
1-5 = Green
6-10 = orange
11-25 = Red
I don't have any idea if this can be done via the Java Script or if it is not possible, I'm sure it will, but I need someone much smarter than me to guide me on how to do it. I guess it's the same concept as the conditional formatting in Excel.
This is something like what I'm trying to achieve.
Any help would be greatly appreciated
Thank you
Matt
Gravity Likelihood Level of risk 1 2 2 2 3 6 3 4 12 You will need to use a custom calculation script, something like:
Custom calculation script
(function () {}
Get the field values as numbers
var v1 = + getField("Severity1").value;
var v2 = + getField("Likelihood1").value;
Calculate the product
var prod = v1 * v2;
Set the value of this field;
Event.Value = prod;
Default background color
var bg = color.white;
Set the color orange
Color.Orange = ['RGB', 1,.33, 0];
Determine the background color on the product
If (prod > = 1 & prod)<=5)>=5)>
BG = color.green;
} ElseIf (prod 5 > & prod)<= 10)="">=>
BG = color.orange;
} ElseIf (prod > 10) {}
BG = color.red;
}
Set the background color of the field
event.target.fillColor = bg;
})();
-
ADF Table cell color based on the value of this field
Dear all,
I want to create a table for our new application that contains a table that is used to represent the data in a table or matrix format.
and each cell of the table should be filled with a color of three colors, based on the value belongs to who will for example: (1-8-> green, 9-20 - yellow etc.).
I don't know how to implement this. Help, please...
RognardPlease post in the subforum that is appropriate for your question.
http://forums.Oracle.com/forums/Ann.jspa?annID=599
This blocking thread
-
Change table cell color according to the input data
Hi, I have a table in a form and I want the cells to have a dark in each cell if it has not entered data, but the cell background color to change white if no text is entered in the cell. Is it possible to do? Thank you.
You can use the fillColor for this property. It depends on your table structure how you do this. If you have relatively small table say 3 columns. 3 rows and then in each cell of sortient / calculate event you can put the following script.
If (Cell1.rawValue == null & Cell2.rawValue == null & Cell3.rawValue == null)
{
Row1.fillColor = "255,0,0";
}
else {}
Row1.fillColor = "255,255,255";
}If you have a larger table, then you must create a function for it.
Thank you
Sidonie.
-
Select the color based on the value of the selected list
Hello
Is could someone please tell me if it is possible to display a LOV with a background color according to the selected value?
In fact, I have a report with many selection lists whose value can be N/A Y, N, and I would like that the corresponding LOVs have the background in color according to the value.
Thanks in advance,
Andreea
Published by: user12064977 on October 20, 2009 02:15Oh! I have not read the word "report" in your original post and I took your page as a form... :(
OK, first of all, run your page and see the HTML source generated for it. Note the value of the attribute "name" for all the columns in the report when you use selection lists. Now using JS, set the background color for them.
Suppose "f03" is the name for your selection list value, then
Try the code in the following page footer section
CheersHari
-
Change the background color based on the value
I'm sure that this is a trivial question, but I can't seem to find the method to do it.
I want to change the background color of an indicator according to its value.
For example: if I have a set of say 123degF, I would like to the color of background color green if the value is either 1% or +/-2degF.
Otherwise the color could be if above red and blue if under.
I was able to schedule a psychic acomplishes, but with more than 50 indicators the interface gets quite busy.
Santosh is correct. Here is a small example of the implementation of this code:
I've also attached a copy of this VI, with the connected devices, so you can use it as a subvi if you wish.
He takes input of temperature limit lower and upper limit. It then returns the value of the temperature, with the color of the indicator of change.
-
Clear the check box according to the value of column DB
Hello
My requirement is to disable the check box according to the value of a column DB. Say for example my report displays the following. Check box, the name of the EMP, Dept. If the Department is the checkbox should be disabled and user should not be able to select the check box.
Ask your help for a solution.
Thank you
PrasanthYou must use the parameter p_attributes of the apex_item.checkbox API to make the boxes off (readonly do not work with the checkboxes)
SELECT .. CASE WHEN
THEN APEX_ITEM.CHECKBOX(1, ) ELSE APEX_ITEM.CHECKBOX(1, ,'disabled="disabled"') END .. -
How ItemRenderer change for DataGrid column based on the value of this column?
Hello! I am trying to create a DataGrid that has a component Button to register when the value of this column is 'Open', then a label saying full when the value of this column is "Full". But Im having a hell of a time he find.
Here's my MXML with 2 different inline installation of components for different rendering engines point 2:
<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >
< mx:Component id = "RegFull" >
< mx:VBox horizontalAlign = "center" verticalAlign = "middle" >
< mx:Label id = 'Full text' text = "Full" / >
< / mx:VBox >
< / mx:Component >
< mx:Component id = "RegButton" >
< mx:VBox horizontalAlign = "center" verticalAlign = "middle" >
< mx:Button label = "Save" / >
< / mx:VBox >
< / mx:Component >
< mx:DataGrid id = "scGrid" width = "100%" height = "100%" number of lines = "4" >
< mx:dataProvider >
< mx:Object label = "Status" data = 'Open' / >
< mx:Object label = "Status" data = "Full" / >
< mx:Object label = "Status" data = 'Open' / >
< mx:Object label = "Status" data = "Full" / >
< mx:Object label = "Status" data = 'Open' / >
< mx:Object label = "Status" data = "Full" / >
< / mx:dataProvider >
< mx:columns >
< mx:DataGridColumn id = "RegCol" headerText = "Reg" dataField = "data" / >
< / mx:columns >
< / mx:DataGrid >
< / mx:Application >
How can I dynamically use the right of itemrenderer based on the value of the field? THANKS FOR ANY HELP PROVIDED!
The best
StephenYou can have more than 1 column renderer engine. There are two ways to do this. One way would be to use States. A State for each possible value in the data. Since you either want a button (data == 'open') or a label (data == 'Full') by using the States wouldn't be a bad choice.
Alternatively, you can use a canvas instead of a VBox. Make a label and a button with horizontalCenter = "0" "0" = red to make them each other. Make it visible according to the data value:
where dataField is the value of the property dataField on this converter DataGridColumn.
-
Hello world
The task seems simple enough, but I have not found a way to populate an attribute transitional according to the value of another attribute when the line is queried. What is the best way to achieve this?
Thank you.
James
Use VORowImpl, if you have any transient attributes defined in the view object, whose value is derived from other attributes of the line, you can override the GET
method and add logic there Please note that this class represents a row in the results collection in a display object.
-
Error: ORA-16757: failed to get the value of this property
Hi all
I have an error:
DGMGRL > see the database dbname_stb LogXptStatus;
Error: ORA-16757: failed to get the value of this property
I check:
DGMGRL > see the configuration;
Configuration - dbname_dg
Protection mode: MaxPerformance
Databases:
dbname_pr - primary database
dbname_stb - physical of the standby database
Fast-Start Failover: DISABLED
The configuration status:
SUCCESS
drcdbname_stb.log:
RSM0: Received the request the property Get: rid = 0 x 01010000, pid = 54
2012-10-17 15:21:14.702 of database Resource: get the LogXptStatus property
RSM 15:21:14.702 2012-10-17 error: trying to interview a 'LogXptStatus' primary type property on a standby database resource.
2012 10-17 error 15:21:14.702 database resource GetProperty (16501,16757)
I don't understand this error?
Thank you all.Take a look on this
-
How to change the color of line according to the value of the column
Hi all
I have an obligation to change the color of the column based on the value. As I have a table of results and the State are success and failure and progresses, if the State values is the success that should appear in green and if the status is failed, that should be red...
Here is my table ADF Trinidad read only tables.
Can someone help me with this.
Thank youHello
Try this:
styleClass="#{row.bindings.Status.inputValue=='IN PROGRESS' ? 'INPROGRESS' : row.bindings.Status.inputValue}"
-
Change of automatic color fields for the range of different values?
Hi, I am a new user of Acrobat Pro and I am trying to understand if it is possible to have the color of the field changed when the calculated value is within a specific range. I have a box of calculated field, and I want it turns to yellow when it reaches a specific numeric range and red when it gets to the other. A change in font color would work too...
The correct code might be:
(function() {}
var v = + event.value;
If (v< 16)="">
event.target.fillColor = color.green;
return;
}
If (v< 27)="">
event.target.fillColor = color.yellow;
return;
}
Value is greater than 27
event.target.fillColor = color.red;
})();
In particular this line of code is invalid:
If (27 16
) {} Something like this would be:
If (v > = 16 & v)< 27)="">
that translated to English is: If the value of the variable v is greater than or equal to 16 and less than 27...
So another functionally equivalent script could be:
var v = + event.value;
If (v< 16)="">
event.target.fillColor = color.green;
} else if (v > = 16 & v)< 27)="">
event.target.fillColor = color.yellow;
} else {/ / value is greater than or equal to 27}
event.target.fillColor = color.red;
}
I don't know if it's exactly what you want, but you should be able to revise it accordingly.
-
Change the fill color based on the value
I found several good examples on how to change the color of a galld based on a value, but am not having implemented lucky. My form is an assessment to 3 areas of the exam results, the total of all 3 can have a maximum value of 100. Sections 1 and 2 are automatically calculated, and section 3 is a value that the user will enter based on the review of all comments, notes, etc. The final score has a rating and outstanding 90-100, satisfying 70-89, unsatisfactory < = 70. Right now I'm not so concerned about the number of color, but I'm not able to get the colors to change at all. Because this field is calculated based on chapters 1 to 3, I put the code on its change event. Once the user enters the final score of manual in section 3, the value is changed automatically. I also tried the partition article 3 manual output event and have obviously not the code or where to put this right. Here is the code I use and would appreciate any help. If I can learn how to make 90-100, I hope I can apply the same method, a different color of 70 to 89 and the title of 70. What I am doing wrong? Thank you.
Form1. #subform [0]. OverallSafetyPerformance::change - (JavaScript, client)
If
( this.rawValue < = 100) & & this.rawValue > = 90
{
this.fillColor
= "102,179,255" "
}
I have an example for you, but it seems that the download has been disabled again. Send me a direct email with your email address and I will send you the document.
-
Dynamic columns according to the values in the database
Hello
Im having a view that has some benefit in her columns. The view should show details of differeent store sales. Im having a column called name of the store that has list of shops. Now, I want to show the details of each store in a column in the report. For example. If 10 stores are there in the database column
In-store sales
-----------------------
Bank 1 120
The Bank 2 140
3 130
Store4 160
Now I need to show that in the report as,
Bank 1 Bank 2 3 Store4
120 140 130 160
If it's the number of stores in the column from the view of increases. columns of the report should also increased. The same value must also be appear in the column header.
Please help me to do so.
Thank you
KnaniHi kitsoukou,
You can use the PivotTable for this and below display the measurements of stores and sales just below.
If you want to change the query or the view itself then you should be knowing the concept of pivot to the lines.
You can go through this link Re: swivel... Several rows in simple row, multiple column
Hope this helps you.
Best wishes
Murielle -
AF:table - change disabled property of input text according to the value of the attribute line
Hello
I use Jdev 12.1.2.
I have a table with the number of lines. Each line has a FutureCode attribute and other attribute FutureComments. I want to make sure FutureComments is disabled unless the FutureCode of this line is is 'OTHER '.
I tried to go to the text of the FutureComments component in the table and setting the property to the expression for disabled:
#{row.bindings.FutureCode.inputValue == 'OTHER'? false: true}
But it does not work. I messed around with the parameters in the table (distribution of content, immediate change), but I did not get a configuration so that it can work.
A little more information, the text input component are always disabled. I also tried using the expression evaluator in the debugger to check the value of my #{row.bindings.FutureCode.inputValue}, but it is null, no doubt because he does not know what line I'm talking about.
Any idea on this? Thank you.
Hello
There the lov on future code?
will not have operator you used? Try
#{row.bindings.FutureCode.inputValue! = 'OTHER'}
If this does not work
Try
#{row.bindings.FutureCode. attributeValue ! = 'OTHER'}
Thank you
Maybe you are looking for
-
Audio device rest in the entry and exit after uninstalling
Hi, I had a problem... I have installed 2 Boom, didn't really need or it so I uninstalled with AppCleaner as usual (it deletes all files owned by this request, finally almost all files) so, when I had uninstalled I still had the 'Boom2Device' in 'Boo
-
Satellite U400 - 15E, french Vista and keyboard
Hello I live in England and I would buy a Satellite U400-15E. However it is possible to order it with a french and french keyboard Vista? Is it possible to order online? Best regards Vincent
-
HP Deskjet f2420: driver download problem
I had WIN7 and the HP Deskjet f2420 was doing great jobToday, I installed WIN 8.1 and I wanted to install the drivers with my CD but it says WIN XP/VISTA/7 taken in charge.Then I went to the HP page to download the drivers to WIN 8.1 but when I searc
-
Hi all my laptop is 14-e038tx with Intel Centrino WLAN + Bluetooth Combo N2230 Pavilion I really want to know if I can replace this module WLAN to other chips for example Intel AC7260. This one has the PPI a half size and of course with bluetooth fuc
-
How can I order recovery discuss for the laptop model
I need to order a CD of replacement for my laptop model # g60-519wm and was informed by the customer service that I have to do it from the hp Web site