Display a column based on another column
Hello
I work in the Apex 4.2.
I have a tabular presentation based on a query.
In this form, I have a column of link change with an icon. When I click it, I open a new page with the details of my record.
I want that this column appears only when the user is entitled.
So, I got in my request a new column based on a Pl/sql function that returns 1 when the logged-on user has the privilege package update the record.
I call this new column "can_update."
After that, I changed the "conditional display" property of my edit_link column.
In type of condition, I put: "value for the element / the expression 1 column = Expression 2.
I put in the expression 1: can_update
I put in the expression 2: 1
But it does not work as I want. colonm "edit_link" never appears.
and the can_update column return the good value 1 or 0 on depend on the recording.
Anyone has an idea on what I didi wrong?
Thank you.
Laurent.
I found a solution to my problem.
I have a column in my query that return 'none' or 'inline' when I have the privilege to update my file and thus, the column "edit_link."
Thos query column name is link_disp
And in the "link attribute" property, the "link in the column" Section of my edit_link, I add: "style =" display: #LINK_DISP #»»
and it works well
Laurent.
Tags: Database
Similar Questions
-
Display list items based on another element of the list
Hi all
I want to display the list item based on another element of the list, but his does not work.
This is my code:
/ * WHEN-NEW-FORM-INSTANCE * /-his work.
DECLARErg_district recordgroup;
rg_name VARCHAR2 (40): = "district";
vtemp NUMBER;
BEGIN
rg_district: = FIND_GROUP (rg_name);
IF ID_NULL (rg_district)
THEN
rg_district: =.
CREATE_GROUP_FROM_QUERY (rg_name,
'select dist, dist district_mas.
);
vtemp: = POPULATE_GROUP (rg_district);
POPULATE_LIST ('BLOCK3.) Of RIDING ", rg_name);
END IF;
END;
* / CHANGED AFTER a - list * /-does not work. Cannot complete the list based on the list
DECLARE
rg_branch recordgroup;
rg_name1 VARCHAR2 (1000): = "branch";
vtemp NUMBER;
BEGIN
rg_branch: = FIND_GROUP (rg_name1);
IF this is ID_NULL (rg_branch)
THEN
DELETE_GROUP (rg_name1);
rg_branch: =.
CREATE_GROUP_FROM_QUERY
("rg_branch",
"SELECT FROM dist_branch WHERE district IN branch (DIST DISTRICT_MAS WHERE DISTRICT = SELECT').
|| : BLOCK3. DISTRICT OF
);
vtemp: = POPULATE_GROUP (rg_branch);
POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);
END IF;
END;
Table:
CREATE TABLE DISTRICT_MAS
(
DIST VARCHAR2 (100 CHAR)
);
CREATE TABLE DIST_BRANCH
(
NEIGHBORHOOD VARCHAR2 (100 CHAR),
DIRECTORATE GENERAL OF THE VARCHAR2 (100 CHAR)
);
Values:
insert into district_mas values ('chennai');
insert into district_mas values ('coimbatore');
insert into dist_branch values ('chennai', 'chennai_north');insert into dist_branch values ('coimbatore', 'Podanur');
Concerning
Nassik M
I tested the code below when the list has changed
DECLARE
rg_branch recordgroup;
rg_name1 VARCHAR2 (1000): = "branch";
vtemp NUMBER;
QT VARCHAR2 (10): = "';
BEGIN
rg_branch: = FIND_GROUP (rg_name1);
IF this is ID_NULL (rg_branch)
THEN
DELETE_GROUP (rg_name1);
END IF;
rg_branch: =.
CREATE_GROUP_FROM_QUERY
(rg_name1,
'SELECT branch, branch OF THE DISTRICT WHERE the dist_branch =' | QT | : BLOCK3. DISTRICT OF | QT);
vtemp: = POPULATE_GROUP (rg_branch);
POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);
END;
Hope it's work...
Hamid
-
Get the cumulative values in a single column based on another column in reports
Hi all
I have a requirement to get cumulative values based on another column.I 'Sales rep name' in the first column.
Since there is no rank option in the PivotTable, I do this in the report table.
Correspondent "Values of the invoice line" in the second column.
Want to have cumulative of all the values for each sales invoice line.
Then apply rank and display the top 10 sales reps based on invoice lines.
Looking for the best entries...
Thanks in advance...Try below
2nd column: "name of Sales rep.
column 2: SUM ("invoice line values ' BY 'Name of Sales rep'") and sort this field desc.
3rd column: fx RANK (SUM ("invoice line values" BY "Sales rep name")), to hide this column, so that you don't confuse your users.and put the filter on the 3rd column below 5
I hope this works for you
-
How do column filter based on another column
In my report, I have column a thru d. I would like to create a filter based on another column where column is column B. I can enter a value that the column cannot be equal to, but I would use a column instead of a value.
Thank you.
JonathanTry this: icon on the filter columns->-> convert this advanced filter for SQL
You can reference any other columnBTW: Have you had a chance to look at my suggestion for your post
Tables from a Table -
Delete based on another column dublicate records
How can I remove duplicate records, based on another column.
the table structure
CREATE TABLE IA_EXPORT_LEVEL
(
A_NO VARCHAR2 (22 BYTE),
IM VARCHAR2 (18 BYTE),
ctn_level NUMBER (2)
)
reviews
A_NO IM ctn_level
S1 S1 1
S1 M1 2
S1 h1 3
H2 S2 1
S2 h2 2
S3 h1 2
S3 h1 3
S4 h6 4
S4 h6 5
I want to delete all records other than the minimum value of the ctn_level
output should like below
S1 S1 1
H2 S2 1
S3 h1 2
S4 h6 4
Published by: OraFighter on December 16, 2011 13:44DELETE FROM IA_EXPORT_LEVEL where rowid IN (select rid from (select rowid rid, row_number() over (partition by A_NO,IM order by ctn_level) rn from IA_EXPORT_LEVEL ) where rn > 1 ) /
Hope your question.
-
Display / hide column IR dynamically
Hello
ApEx Oracle 10g and 11g 4.1.0.
I need to be able to dynamically hide or display columns in an interactive report, based on a value of element (radio buttons), without reloading the page.
I have two columns 'H' and 'Z' in my interactive report.
I have a question P9_COORD_SYSTEM (radio buttons) which can return 'H' or 'Z '.
And I want to show/hide the right according to the value of the column.
I tried to set conditional display of column "H":
-Condition Type: Point value / Expression 1 column = Expression 2
-1 expression: P9_COORD_SYSTEM
-Expression 2: H
But it is not working, even reloading the report in question of the modified value:
I can show/hide the columns using Javascript, of course, but when I change the pagination in the report I have to hide/show columns every time...$('#P9_COORD_SYSTEM').change(function() { gReport.search('SEARCH'); });
So it is not a solution...$('#P9_COORD_SYSTEM').change(function() { if ($v('P9_COORD_SYSTEM') == 'H') { $('#my_report').find('th[id="Z"], td[headers="Z"]').hide(); $('#my_report').find('th[id="H"], td[headers="H"]').show(); } else { $('#my_report').find('th[id="H"], td[headers="H"]').hide(); $('#my_report').find('th[id="Z"], td[headers="Z"]').show(); } });
Is there any solutions for this?
Thank you for your help.
Yann.Yann39 wrote:
Conditional display of column "H":
-Condition Type: Point value / Expression 1 column = Expression 2
-1 expression: P9_COORD_SYSTEM
-Expression 2: HHello
Also remove leading colon to the name of the element in the Expression 1
Kind regards
Jarihttp://dbswh.webhop.NET/dbswh/f?p=blog:Home:0
-
I just started using my new iMac 27 "and in Mail, I can't find the setting to display a column that shows the number of emails in each folder. Mavericks, I had this column. I have checked all the menus and preferences and search online.
Click the triangle next to the Inbox to view the Inbox for each account. Then select the desired mailbox and the information will be displayed in the upper part.
You are entitled to 90 days telephone support from Apple. Try to contact them.
-
Compare and display several column data according to requirement
Hello
I have a requirement where I want to compare the data in two tables and display only the columns if there is a gap using the sql query.
Tell userid, e-mail and phone number of the same employee is stored in two tables. Now, I want to compare data from e-mail and phone number of the two tables and display the e-mail and phone number as if they are different data.
Employee table:
user_id E-mail phone emp01 [email protected] 00200 emp02 [email protected] 00300
emp03 [email protected] 00400 Table user_details:
ID user_email user_phone emp01 [email protected] 00201 emp02 (null) 00300 emp03 [email protected] 00401 Please note that both tables have completely different column names and the data may contain a null as well. What I want to achieve is to compare the same employee data in both tables and display columns that have a different value of user_details table; as:
user_id user_email phone emp01 [email protected] 00201 emp02 (null) emp03 [email protected] 00401 As the table column names are different, I can't use a join and less to know the difference. I tried this with the help of CASES after the WHERE clause for comparison of columns multiple but GOLD or AND the two would defy the condition to display all columns with different data for the same line.
How to do this without creating a separate view or a table that I don't have write access? Pointers would be useful.
-Thank you.
No need for something like
You just run
Select k.user_id, k.id,.
e.email, u.user_email,
e.Phone, u.user_phone
of user_key_table k
left outer join
e employee
On k.user_id = e.user_id
left outer join
user_details u
on k.user_id = u.id
the rest is here just to simulate your tables (I don't want to create tables in my APEX Tablespace as there are far too many people already)
Concerning
Etbin
-
How to not display the column heading in the table view?
I don't want to display the column header in the table display, how I can make?
If you use JavaFX 8, you can use the following text in an external style sheet:
.table-view .column-header-background { -fx-pref-height : 0 ; }
If you use JavaFX 2.2, the - fx-pref-height attribute is not available in css, so I think that you must resort to a search:
final Region tableHeader = (Region)table.lookup(".column-header-background"); tableHeader.setPrefHeight(0);
As always, I am obliged to point out that I don't really like the research. Sometimes, they seem to be the only way, however.
-
Display the column in the table, but not in the IR
Hi guys,.
[apex Oracle 11 g 4.2]
Is there a way to display a column in a graph that is generated by the IR and is not in the table-IR?
I know I can chosse columns in the IR and choose to not display this column. It's going to work.
But if I put the column 'hidden' in the attributes of IR Section I can't create a chart out of it.
So I want to create a graph of the same data that the (default) column is hidden.
THX in advance ThorstenThere is no way to do it.
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Apress.com/9781430235125
http://Apex.Oracle.com/pls/Apex/f?p=31517:1
http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
------------------------------------------------------------------- -
javaFX: cellvalue TableView is not enough to display in columns, it will cut end «...» "how show a tip on these cells?
I need a gimmick because sometimes I can't drag the colunm head. So I can't see the contents of the cell.Create a custom cell and replace the updateItem method. Add a balloon:
Tooltip tip = new Tooltip(getString()); Tooltip.install(this, tip);
Here is an example (a ToolTip for the column email):
import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage; import javafx.application.Application; import javafx.beans.property.SimpleStringProperty; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.geometry.Insets; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.control.TableColumn.CellEditEvent; import javafx.scene.control.TableView; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; import javafx.scene.control.cell.PropertyValueFactory; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.scene.text.Font; import javafx.stage.Stage; import javafx.util.Callback; public class TableViewToolTipSample extends Application { private TableView
table = new TableView (); private final ObservableList data = FXCollections.observableArrayList( new Person("Jacob", "Smith", "[email protected]"), new Person("Isabella", "Johnson", "[email protected]"), new Person("Ethan", "Williams", "[email protected]"), new Person("Emma", "Jones", "[email protected]"), new Person("Michael", "Brown", "[email protected]")); final HBox hb = new HBox(); public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Table View Sample"); stage.setWidth(450); stage.setHeight(550); final Label label = new Label("Address Book"); label.setFont(new Font("Arial", 20)); table.setEditable(true); Callback cellFactory = new Callback () { public TableCell call(TableColumn p) { return new CustomCell(); } }; TableColumn firstNameCol = new TableColumn("First Name"); firstNameCol.setMinWidth(100); firstNameCol.setCellValueFactory( new PropertyValueFactory ("firstName")); // firstNameCol.setCellFactory(cellFactory); TableColumn lastNameCol = new TableColumn("Last Name"); lastNameCol.setMinWidth(100); lastNameCol.setCellValueFactory( new PropertyValueFactory ("lastName")); // lastNameCol.setCellFactory(cellFactory); TableColumn emailCol = new TableColumn("Email"); emailCol.setMinWidth(200); emailCol.setCellValueFactory( new PropertyValueFactory ("email")); emailCol.setCellFactory(cellFactory); table.setItems(data); table.getColumns().addAll(firstNameCol, lastNameCol, emailCol); final VBox vbox = new VBox(); vbox.setSpacing(5); vbox.setPadding(new Insets(10, 0, 0, 10)); vbox.getChildren().addAll(label, table, hb); ((Group) scene.getRoot()).getChildren().addAll(vbox); stage.setScene(scene); stage.show(); } public static class Person { private final SimpleStringProperty firstName; private final SimpleStringProperty lastName; private final SimpleStringProperty email; private Person(String fName, String lName, String email) { this.firstName = new SimpleStringProperty(fName); this.lastName = new SimpleStringProperty(lName); this.email = new SimpleStringProperty(email); } public String getFirstName() { return firstName.get(); } public void setFirstName(String fName) { firstName.set(fName); } public String getLastName() { return lastName.get(); } public void setLastName(String fName) { lastName.set(fName); } public String getEmail() { return email.get(); } public void setEmail(String fName) { email.set(fName); } } class CustomCell extends TableCell { private TextField textField; public CustomCell() { } @Override public void updateItem(String item, boolean empty) { super.updateItem(item, empty); if (empty) { setText(null); setGraphic(null); } else { if (isEditing()) { if (textField != null) { textField.setText(getString()); } setText(null); setGraphic(textField); } else { setText(getString()); setGraphic(null); Tooltip tip = new Tooltip(getString()); Tooltip.install(this, tip); } } } private String getString() { return getItem() == null ? "" : getItem().toString(); } } } If you need a ToolTip for a column heading:
TableColumn emailCol = new TableColumn(); Label emailHeaderLabel = new Label("Email header label"); emailCol.setGraphic(emailHeaderLabel); Tooltip tip = new Tooltip("Email header label"); Tooltip.install(emailHeaderLabel, tip);
Edited: Add a ToolTip to a column header
-
give user option to display a column in asc/desc as needed
Hi all
I have a report and I want to give the user the flexibility that it can display a column in a way asc/desc fields.
Is it possible for a user to give an option as a button or some list drop down so that he can make a choice to view the results accordingly.
If anyone can suggest a way... !
Thank youJin
In a table view, we have the option "Enable column sorting in the dashboards.View table--> Table View Properties--> check the column enable sorting in dashboards.
While in dashboard users have the flexibility to sort their reports asc/desc...Thank you
saichand.v -
Custom color in display Gantt chart based on the State - Apex 4.2
Hello
I need to specify the custom color display Gantt chart based on the State.
Say: Open - Red
Progress-yellow
Cancelled - blue
Closed - Green
given that the status column is not part of Gantt chart question, how?
Option color in table attributes is not helping this requirement.
Kind regards
Sanjaya
Hello
Finally, the problem is resolved with the help of Hilary Farrell-Oraclefantastic example and help anychart pages. This is useful for this URL.
https://Apex.Oracle.com/pls/Apex/f?p=36648:30:102588100613368:
http://6.anychart.com/products/anygantt/docs/users-guide/index.HTML?project-Gantt-chart.html
http://6.anychart.com/products/anygantt/docs/users-guide/index.html?defaults.html
-Sanjaya
-
Choose field from the joined table based on another field?
Hello!
Is it possible to select a field in a row of attached table based on another field? Consider the following data in the CVALUES table:
And the following data in the table MDETAIL:ID C1 C2 C3 C4 C5 C6 T1 9.6 10.3 12.4 19.6 19.6 0 T7 9.6 10.4 0 0 0 0 T3 8.2 9.9 11.4 19.6 19.6 0 T8 8.3 10.7 13.5 20.7 0 0 T5 9.4 10.3 12.7 22.9 19.6 0 ...
I want to get the column corresponding to the VALUE field in the table MDETAIL CVALUES. I'm doing this:ID MDATE CNUM ... T1 03/28/2012 18:00:00 4 T1 03/28/2012 18:00:00 1 T8 03/29/2012 06:00:00 6 T8 03/29/2012 06:00:00 5 ...
The CVALUES table records are unique; only one line by ID.SELECT m.t1, m.mdate, CASE WHEN m.cnum = 1 THEN c.c1 WHEN m.cnum = 2 THEN c.c2 WHEN m.cnum = 3 THEN c.c3 WHEN m.cnum = 4 THEN c.c4 WHEN m.cnum = 5 THEN c.c5 WHEN m.cnum = 6 THEN c.c6 END AS cvalue FROM mdetail m JOIN cvalues c ON m.id = c.id
This method works and it's fast, but it's messy code and I think there must be a better way to do it. I use cvalue value in several calculations so each calculation that I use is this giant glob of CASES inside!Hello
With a decoding it would be easier, but as ugly :-)
SELECT m.t1, m.mdate, DECODE( m.cnum , 1 , c.c1, 2, c.c2, 3, c.c3, 4, c.c4, 5, c,c5, 6, c,c6) cvalue FROM mdetail m, cvalues c WHERE m.id = c.id
Success!
FJFranken
-
BC4J editable attribute based on another attribute
Hello.
Is it possible to define updatable (read-only) on BC4J, based on another column. For example if attribute a == true which attribute the (Always) b.setUpdatable of other b.setUpdatable (Never). By definition, changing Updatable property to EO/VO for each line is an absurdity. Or not?
I know how to do it on ViewController (set ReadOnly property expression EL provided you attribute a different value) but don't know how to do (if it is possible) on model?
THX
Concerning
Zmedazmeda,
You can override isAttributeUpdatable() on your EntityImpl or ViewRowImpl classes
John
-
Update of the table based on another
Hello
I'm trying to update a date column in a table based on another table. There is a unique ID in each table that identifies and connects each person:
This is the error:update patient_bu a set a.entry_date = (select b.entry_date from CLIENT_MED_DT b where a.id = b.id)
ORA-01427: einreihig subquery returns multiple rows
The problem (I think) is that the select statement back several dates for records people. There are some people / records that have multiple entry dates, but I'm only interested in the most recent date.
How can I update this table with only the most recent date?
Thanks for any help,
MattOh well, I forgot the UPDATE clause:
SQL> create table patient_bu 2 (id number 3 ,entry_date date); Table created. SQL> create table client_met_dt 2 (id number 3 ,entry_date date); Table created. SQL> merge into patient_bu a 2 using (select id 3 ,max(entry_date) max_date 4 from client_met_dt 5 group by id 6 ) b 7 on (a.id = b.id) 8 when matched then update 9 set a.entry_date = b.max_date; 0 rows merged.
Maybe you are looking for
-
S230u Windows 7 unknown device
My company recently bought a ThinkPad S230u for use on the ground, time management and others, to help relieve the duties of our managers. However, my company only supports up to Windows 7, so it was my job to make this thing work on Windows 7. I man
-
Service Pack downloads on reinstalled Windowx XP OS 1,2,3
Due to problems with my laptop, I had to re install Windows XP. I need at least service pack 2 to download my air card broadband for internet access because it requires at least Service Pack 2 to download the Sprint air card that is needed to access
-
Win10 restart again and again to the logo screen
Purchased 10 Windows to replace XP on an older desktop. When I ran the tool requirements of Win7, it said I was OK to upgrade. I guess if I can run 7, I can run 10. File .iso downloaded and made a bootable DVD disc. DVD player was 1st in the boot ord
-
Connection Officejet 8500 for Apple AirPort Extreme
I have on two devices. The airport has a network running running. I plugged the Officejet 8500 at the airport with a network cable. When you open AirPort Utility, he does not see the printer. When you use the printer menu, I was not able to find
-
XPS 13 screen flickers when you wake up after upgrade Windows 10
Whenever I have turn on the laptop, or reactivate it the screen upward when it darkens, the screen starts to Flash. It's as if it was glitching seconds before it stops... It lights up for about 5-10 seconds. It started to happen after that I've upgra