Master-Detail Form, Conditional Display of a Column Link
Hey Guys,
I've got a little question for you:
I use a Master Report with a Column Link that i would like to hide when my Column in the Report named "NUMBER" is 0.
I can't get it to work though. Using the "Conditional Display" stuff doesn't seem to work.
I have looked at some CASE statements but i cant seem to make them fit!
Any suggestions?
Thanks alot,
max
sorry for the trouble, i am quite new to this.
Yes, i took my Master Report and added a [column link]. I understand now how the sql has to look like but where do i put this?
I cant find any space for a sql code, or does it belong in the conditional display section?
I changed the Column Attributes to standard column, however, this seemed to have no effect.
Do i have to chance my sql select query for the Report?
It looks like this at the moment...
SELECT
"CONTENT_LOCALES"."CONTENT_LOCALE_ID" "CONTENT_LOCALE_ID",
"CONTENT_LOCALES"."CONTENT_ID" "CONTENT_ID",
"CONTENT_LOCALES"."LOCALE_ID" "LOCALE_ID",
"CONTENT_LOCALES"."NAME" "NAME",
"ORIGIN_TEXTS"."ORIGIN_NAME" "ORIGIN_NAME",
"DESIGNS"."DESIGN_ID" "DESIGN_ID",
"DESIGNS"."DESIGN_NAME" "DESIGN_NAME",
"CONTENT_LOCALES"."SEQUENCE" "SEQUENCE"
FROM
"CONTENT",
"DESIGNS",
"CONTENT_LOCALES",
"ORIGIN_TEXTS"
WHERE (("ORIGIN_TEXTS"."GID" =:GID and "CONTENT"."CONTENT_ID" =CONTENT_LOCALES.CONTENT_ID and "CONTENT"."DESIGN_ID" =DESIGNS.DESIGN_ID and >"CONTENT_LOCALES"."CONTENT_LOCALE_ID" =ORIGIN_TEXTS.CONTENT_LOCALE_ID))
Similar Messages
-
Master Detail Form with Report - Referring a column in another table
I have master detail form with a report option. The master table has a column that also references a look up table.
When the report is displayed the lookup column id is displayed. Rather I want to get the look-up value from a lookup table
and display in the report.
When I see the report region Query definition , it just has the columns to add/remove only from the master table.
Could you pls help me with this regard.
Eg :
Dept Table
dept_id
dept_name
location_id
Employee Table
employee_id
employee_name
dept_id
location
location_id_id
location_name
Master is Dept, Detail is dept and lookup table is location.Simply add the lookup table to the FROM clause and join its PK with the FK in the master table in your query. That's basic SQL, and you definitely must get a good grasp of SQL to do more than very basic work in APEX.
For a good example, please see http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10498/build_app.htm#BCEBJJGB
While you're at it, read and implement the tasks outlined in the 2 Day + Application Express Developer's Guide - http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10498/toc.htm. After that, read the "Oracle Application Express 3.0-- Building a Functional Application" OBE in http://www.oracle.com/technology/obe/apex/obe30/apexdev30.htm - great stuff.
Georger -
Conditional display of a column link in sql updateable report
Hi There,
I've attempted to look thru the Apex forum about using an Authorization Scheme in an SQL Query (Updateble Report) where I can conditionaly enable (display) a column link based upon a value in the report but alas I cannot find a solution.
What I have is a SQL Query (updateable report). What I want to achieve is dependant on the value of one of the columns in the report query conditionaly display a column link for the row being displayed. For example if the report dispayed the data from emp, dept only display a column link for rows where the deptno = 100 otherwise don't display the column link. Is this possible to achieve?
I've tried to define in the authorizatuon scheme in the where clause of an SQL Statement to reference the report column as #deptno# but this doesn't work.
TIABoketi,
I was unsuccessful yesterday in demoing what I believe you want to achieve. It appears that an authorization scheme will not process row by row within a standard report so as to allow a conditional display of a link or any other column attribute. You can conditionally display a column by the use of a page item but this method appears to be all or nothing.
I was successful when I coded the return of the empno via a Case statement but the Link still appeared even though there was no value (empno) to link with. So essence the link to you to a blank for with no PK to read the database by.
SELECT CASE WHEN deptno = 10 THEN empno ELSE NULL END empno,
ename,
job,
hiredate,
sal,
comm,
deptno,
phone_nbr
FROM empJeff -
Master Details form (LOV based on Detail Column of Join Condition)
I have created a master detail form where user_id is joining master and details.
I have created one dynamic lov based on child user_id in detail block to diplay all user who works under current user.
Problem : When i want to select Insert detail action in detail block the dynamic lov should read the user_id which is going to be inserted when you press Save button. Means as its not getting populated till one click on save button my lov is not getting refereshed.
Please advice what should i do.
Thanks
BakuleshI solved myself by modifing some guru's script from this forum little bit. I am adding here for feedback or use to any.
htp.p('<script language="JavaScript1.3">
function getMstFieldValue(form,fieldName)
var objName = "";
var tmp = "";
var dAction = "";
var sel_idx = 0;
var cnt = 0;
var instance = 0;
var slicedName;
var fillData = new Array();
var blkname;
for(var i = 0; i < form.length; i++)
slicedName = form.elements.name.split(".");
tmp = slicedName[2];
instance = parseInt(slicedName[3],10);
blkname = slicedName[1];
//alert("Fld "+tmp+" blk "+blkname+ " instance "+instance);
if (!tmp)
continue;
objName = tmp;
if (objName == fieldName && blkname == "MASTER_BLOCK")
return form.elements[i].value;
function setDetFieldValue(form,fieldName,value)
var objName = "";
var tmp = "";
var dAction = "";
var sel_idx = 0;
var cnt = 0;
var instance = 0;
var slicedName;
var fillData = new Array();
var blkname;
for(var i = 0; i < form.length; i++)
slicedName = form.elements[i].name.split(".");
tmp = slicedName[2];
instance = parseInt(slicedName[3],10);
blkname = slicedName[1];
//alert("Fld "+tmp+" blk "+blkname+ " instance "+instance);
if (!tmp)
continue;
objName = tmp;
if (objName == fieldName && blkname == "DETAIL_BLOCK")
form.elements[i].value = value;
</script>');
thanks
Bakulesh -
Master-Detail-Form; Hide/Show columns in detail form depending on column
Hi,
i have a master detail form. In the detail form i have the columns:
ID, MASTER_ID_FK, PC_SOURCE, A_C1, A_C2, A_C3, B_C1, B_C2, B_C3
The Column PC_SOURCE should be a LOV with values
NULL
A
B
So if i choose or enter a master record the detail form appears and i can enter one or more detail records.
PC_SOURCE is the first column.
If i choose A, the columns B_C1, B_C2, B_C3 should disappear as there should no entry possible.
If i chhose B, the columsn A_C1, A_C2, A_C3 should disappear as there should no entry possible.
Is that possible?
I tried a little on my own but without success. I tried to put into the first column (PC SOURCE lov) in Element Attributes a javascript call like onChange="do_Refresh('#PC_SOURCE#');"
The javascript funktion do_Refresh tries to catch the column value and set a hidden item P1_SOURCE like document.getElementById('P1_SOURCE').value = v_source;
But this does not work, as there is not the value of the column fetched.
And probably can´t work because of the more than one detail rows.
Thanks & regards,
MatthiasHi,
The html for your detail form will be a table of input elements with names f01,f02,etc. The columns for the key fields are normally hidden so your PC_SOURCE column will probably use the name f03. The name for column A_C1 will be f04 etc.
Once you have the input names for your columns you can create a dynamic action (DA) to hide the elements you want.
You want the DA to fire when any PC_SOURCE element is changed so you want the when to be:
Event: Change
Selection Type: jQuery Selector
jQuery Selector: input[name="f03"]
Condition: no condition
The action is to hide an element in the same row if the changed element is a value. So the action should be:
Action: Execute JavaScript Code
Fire when Event is: true
Code: if(this.triggeringElement.value=="A"){$x_Hide('f04_'+this.triggeringElement.id.split('_')[1])}
You then need lots of true actions for each element you want to hide.
Rod West -
Controlling display of details in Master Detail form
Hi
I have a Master Detail form that opens up only in update mode. The master record is display only and only one of the detail fields, "Qty Fulfilled" is editable and the rest are display only. So, the form currently, has a text box only for the Qty fulfilled field.
I set the # of detail rows option to 5. So my form shows a column of 5 boxes, even if there are only 2 detail row.
How do I hide the remaining 3 boxes which have no data in them?
Please help , this is urgent.btt
-
Apply "WHERE CONDITION" in "MASTER/DETAIL FORM" in "ORACLE APEX
Hi to all respected Gurus of this community.
I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
"1 error has occurred
The condition you are adding has caused the query to be invalid."
Please help how to proceed to apply a where condition.
Regards
Muhammad Uzair Awan
Oracle APEX Programmer
Pakistanuzairmalik wrote:
Hi to all respected Gurus of this community.
I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
"1 error has occurred
The condition you are adding has caused the query to be invalid."
Please help how to proceed to apply a where condition.
Regards
Muhammad Uzair Awan
Oracle APEX Programmer
Pakistan
Probably a syntax error. Check the syntax of the new clause very carefully.
Can you post the query indicating which predicate is the new one? If you need to change the column and table names for confidentiality -
Updating columns in master/detail form
Changes were made to the database that is in the master part of a master/detail form. I have tried to add the new fields using "Create Item" on the page definition.
I have gone through the wizard and set the source items to:
Source Used: Always
Source Type: Database Column
Session State: per session
Source Value: AppsDependentOn (the name of the newly added field)
It seems that the form will not display the new column - it does display the label and a blank textfield. I have no problem adding columns to the detail part of the form."197331",
For Source Value, try uppercase instead: APPSDEPENDENTON
Sergio -
Master Detail Form is ignoring the 4th join condition
Hello All,
I have master detail relationship between two tables with a
composite foreign key (of 4 columns). I'm creating a master
detail form in O9iAS Portal 3.0.9.8.0 on these 2 tables
successfully with no errors. The only thing I have noticed, is
that the wizard does not populate the join conditions
automatically in step#3. The form runs Okay but it ignores the
last condition (i.e., 4th), which means that it brings too many
details records.
Any ideas
Much appreciated if you can CC me: [email protected]
Hamada HimaI had this same problem with master/detail form and 4 join conditions. I opened up a TAR and after several weeks
Oracle determined this to be a bug and submitted it to developers.
For a work around, I created a view with two of the join fields concatenated together, then created another md form
with 3 join conditions and it worked. Good luck. -
Join 2 tables and display in Master Detail Form
Hello Everyone,
Please help me out on the following.
I have 2 tables with common field ID I want to join the 2 tables and will show the results on Master Detail form .Please suggest me on this thing .
ThanksHi,
The ID primary key on the details table should be ok provided you have some means of populating it - usually via a trigger that gets a new sequence number.
When the page is loaded, do you see data in the details tabular form? Or is the problem only for when you are creating entirely new master/detail records?
When adding a new record into the details form, the FK field should be populated with the PK of the master form by default. On this report, go to the Contract_Number column and have a look at the Column Attributes for it. You should see a section for Tabular Form Element and in there are two settings - Default Type and Default. The Default Type should be Item.... and the Default should be the master record's PK page item name (eg, P1_CONTRACT_NUMBER). Underneath these settings should be the settings Referrence.... - check that these correctly point to the field on the details table. If you have different settings, try changing them - otherwise, list them here so that we can check
Andy -
How to display more rows in Master-detail form
I am working on APEX3.2.
I have a master-detail form. The detail form always display 15 rows. However, my customer wants the detail display all the rows. I tries to configure the Number of Rows in the report. It doesn't work. How do I do it?
Thanks a lot!Hi:
To increase number of rows displayed you have to set Number of Rows and pay attention to both Number of Rows (Item) and Maximum Row Count.
After that if didn't work, sign out or close the browser then open it again. Sometimes it keeps the value in current session.
Saad, -
Hi cant see the primary key column in master detail form
I have a master detail form .In the first master form i am unable to see the primary key
Now the form is built completley and i also will like to see the primary key column visible in master report
If i had set the primary key as rowid then i could have seen the primary key ..
Now i can see the pencil icon (The eidt row pencil icon) instead of the actual primary key column . .which is a number data..
I will like that too be visible ..Can any one guide what should i do for this..
ThanksHi Mat,,
I am using apex 4.2 db version 11g and in the first master page i had set the value of combo which is primary key column as text
But still iam not able to see the number ..Note if i recreate the form ..with rowid as primary key i am able to see the column since the pencil icon(edit icon) is on row id..
Currently All i see is the edit icon ..I need both the edit icon and also the number ..
Thanks -
Master/detail form - Detail columns lack help information
I have a master/detail form. All the fields in the master block have help information attached to assist the user when entering data. The detail block, which is more of a multi-row based block, has column headings along the top. However, no where can I insert "help" text for these particular columns. Although self explanatory, it still would be nice to be able to incorporate "help" text for these columns. Am I missing something? Can this be done? I've thought about a button on top of the region which could call an html page with help for these columns, it just seems to be a "rougher" solution than whats available to the individual fields in the master block.
Hi,
Nope, you're not missing anything - there is no Help functionality. This is probably because the Help on page items is available for "Labels", which do not exist for tabular forms, which are based on a report structure.
You would, if you wanted, update the heading to include a "tooltip":
Instead of, for example:
HiredateYou could enter:
<span title="Enter the employee's hire date">Hiredate</span>It should also be possible to mimic the popups you get for page items if that is what you need
Andy -
Limit on number of columns details of a master detail form/report
Hi,
I understand that there is a limit to the number of columns you can have in a master detail form/report. I am on Apex 4.01 and have a detail section that shows 24 months at a time as columns with integer hours assigned each month. My master detail was working fine with as many as 24 months/columns in this detail section, but I tried to re-use months by 'recycling' months, clearing them out of values and adding the months to the end of each row but now I am getting errors even though I had more columns showing before my 'recycliing' of the columns. The error is:
"ORA-06502: PL/SQL: numeric or value error: character string buffer too small "
What I don't understand is -- why am I getting this error now when I actually had more columns in the detail section months ago, and all I am doing is 'recycling' prior columns back into the detail report, not actually adding columns.
Thanks for any insights anyone can give.
PatDBA tells me that we are at 9.0.2.2.14, (higher version than the one you suggested) but I still get the same error.
Thanks,
Karuna -
Master Detail Form - Update Statement for Column in the Detail Section
Hello,
I've posted a demo application to apex.oracle.com
Application# 49298
Application Name: Street_Inventory
Basically, on page 3 I have a Master Detail Form. In the Detail section, I want the value of On_hand to save to table ITEMS. Here's my code below.
SOURCE
select
"CONSUME_DETAIL"."CONSUME_DETAIL_ID",
"CONSUME_DETAIL"."CONSUME_HEADER_ID",
"CONSUME_DETAIL"."ITEM_ID",
"CONSUME_DETAIL"."CONSUMED_QUANTITY",
("ITEMS"."ON_HAND" - "CONSUME_DETAIL"."CONSUMED_QUANTITY") as "ON_HAND"
from "CONSUME_DETAIL",
"ITEMS"
where "CONSUME_HEADER_ID" = :P3_CONSUME_HEADER_ID
and "CONSUME_DETAIL"."ITEM_ID"="ITEMS"."ITEM_ID"
UPDATE INVENTORY PROCESS
UPDATE ITEMS
SET ON_HAND = :P3_ON_HAND - :P3_CONSUMED_QUANTITY
WHERE ITEM_ID = (select ITEM_ID
from CONSUME_DETAIL
where CONSUME_DETAIL_ID = :P3_CONSUME_DETAIL_ID);
My code isn't working. What am I doing wrong?WReed,
The first thing I see "off the bat" is that you don't have items named P3_ON_HAND and P3_CONSUMED_QUANTITY which are referenced in your code. Although it's possible to do what you want with just SQL, I updated your code with a little PL/SQL to make it easier to understand...
As you'll see the problem now is that the design/db model is not quite right as your getting a too many rows error.
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen
Maybe you are looking for
-
How to include a .class file in a jsp page
hi everyone, i know the syntax as: <%@ include file = "filename.class" %> then at run time the server could not find the class file if i use, <%@ page import = "FileName.class" %> then also the same problem persists & if i use <jsp:include page = "Re
-
How can I get Firefox to open the page of a link I've clicked on in an email?
Every time I click on a link, in an email (or in Facebook), unless a Firefox page is already open, I usually get my home page first. Then I have to go back to the email window to access the link again to get the page I wanted from the link. Is there
-
Setting up a cluster with a mini
Hi! Given the amount of work I am doing lately I am debating about getting a mini to do some of the batch processing work. I have checked FCP Pro's specs for that and I know that the Intel Core Duo will work. But my question is that it also says in t
-
Passing Info Back from Embedded Applet
Here is the whole story any assistance is appreciated. I have to provide the capability to select and upload multiple files to our server via our web application. Since the HTML file selection only allows choosing one file at a time I have resorted t
-
Print Preview shows (and prints) only a portion of a page,
Not the printer's fault - it prints what Print Preview sends it (about half a page).