Empty record in (detail record)
Hello all of you,
i have detail block,, and in that block, it is not necessary to write in all field . i want that when the user fetch the record, the empty field fill with red color,,
is it possible
example
item # | Name | Detail | Qty | Issu_date| Recived_date | Iss_person | Rec_person | etc
10000.|abc.....| ........ |..300|..01-jan-06|.......07-jun-06 |john............|david............|
20000.|xyz.....|NY.... |........|..08-jun-06|.....................|smith..........|................... |
the user enter 20 to 30 record in the detail block
thank alot
You can try this only when you have no other option.
You will have to write three triggers.
1. When-new-form-instance at form level
declare
myvar varchar2(25);
it_id item;
begin
if (:block3.text2) is null then
it_id:=find_item('block3.text2');
Set_Item_Property(it_id,BACKGROUND_COLOR,'r255g0b0');
end if;
end;
2. When-new-item-instance at item level
declare
it_id item;
begin
it_id:=find_item('block3.text2');
Set_Item_Property(it_id,BACKGROUND_COLOR,'r255g255b255');
end;
3. post-text-item at item level
declare
myvar varchar2(25);
it_id item;
begin
if (:block3.text2) is null then
it_id:=find_item('block3.text2');
Set_Item_Property(it_id,BACKGROUND_COLOR,'r255g0b0');
end if;
end;
Message was edited by:
Mayank Parmar
Similar Messages
-
Use field from file header record in detail records
Hi,
I receive a file with different records type (transmission header, file header, detail records, file footer). The fields in each record type are different. The transmission header tells me who the sender of the file is. I need this information, because I am merging data of various senders into one table.
When processing the files, I need to split each file according to recordtype. (I can not use the same logic for each recordtype). How can I populate an extra column in the detail files with the value from the header record?
What I tried so far is the following:
- Populate a global variable using a script: This does not seem to work in the context of dataflows.
- Create a 'join' between header record and detail record. However there are no fields I can join, so Data Services is not happy with that.
- Store the field value from the header record in a DS (I chose a cache datastore, memory datastore did not work in batch scenario. I feel I can get this to work, but it seems quite an elaborate and expensive solution: First Filter the header record from the file, write the required field to the cache datastore, then read the same file but now filter the detail records, and join this with the datastore.
Is there a better way to do this? I was hoping I could just use a script and read the first line of my file and move the value to a global variable....
It would be great if someone could give me some tips...
Many thanks,
Jan.Hi Werner,
I am not sure if I understand you correctly.
I have declared $State as a global variable, not as a parameter.
When I check my custom function I do get a warning that a variable is called which is not declared.
I thought I did not have to worry about this as the variable does exist within the job where the function is called.
It looks like I can not set a value to a global variable in a custom function.
Is that correct, or is there something wrong with my syntax?
Really the only reason I call a custom function is to set the global variable, so I could even make my function as simple as this:
$State = 'NSW';
Return 0;
It still doesn't work...
Any idea why?
Thanks,
Jan. -
Delete master record if detail records are empty
I have a simple question and response system
the user enters their details (record stored in table called source - pkey as id_src)
the user then goes on to answer questions (in a form)
those responses are kept in a separate table (responses)
with a foreign key in each response row telling me the ID of the source ie fk_id_src
the form has a SUBMIT and CANCEL button
PROBLEM
If a user registers their details (created a source record with an ID)
but fails to answer and questions (the response table does not have any foreign keys to that ID source)
what is the best way to AUTOMATICALLY delete the user record (if there are no detail records in the response table)
(note: the main response form IS NOT an ADDT form)
the checking process needs to be triggered by the CANCEL button
ie if the user presses submit - responses will be made to the questions - ie they will be empy answers - but in this case it is valid to do so
I was wondering about a custom transaction - with delete SQL -
or using check detail records - but cant see how to get that to fire the delete record transaction?
any guidance appreciated
tia
PaulOK
I can create a separate page that checks if a detail record exists
and display an error if it does
on the same page I can add a delete transaction
pass the master record id
Both work, all OK so far
BUT, the check detail throws its error message if detail records DOES EXIST
I need to allow the delete transaction to run, if detail records DO NOT EXIST
AND then
redirect then page - wether the delete occurs or not
any ideas?
Paul -
Formula field, Detail records not getting updated
Hello seniors,
i need help on 2 issues;
first, Issue No. 1
i have master-detail form with the following tables;
POH master record table
PH_NO pk
PH_PARTY
PH_FXRATE exchange rate
PH_PD_LOCAL_TOT total of PD_LOCAL_AMT from details records
PH_PD_FOREIGN_TOT total of PD_FOREIGN_AMT from details records
POD Detail records table
PD_PHNO fk
PD_ITEM
PD_QTY
PD_PRICE
PD_LOCAL_AMT
PD_FOREIGN_AMT
M_PD_FOREIGN_AMT Formula (PD_QTY * PD_PRICE)
M_PD_LOCAL_AMT Formula (M_PD_FOREIGN_AMT/PH_FXRATE)
CTRL Control block
M_PH_PD_LOCAL_TOT Summary-Sum-Table=POD, Field=M_PD_LOCAL_AMT
M_PH_PD_FOREIGN_TOT Summary-Sum-Table=POD, Field=M_PD_FOREIGN_AMT
Triggers
POH Table
Pre-Insert and Pre-Update
:PH_PD_LOCAL_TOT := :M_PH_PD_LOCAL_TOT
:PH_PD_FOREIGN_TOT := :M_PH_PD_FOREIGN_TOT
POD Table
Pre-Insert and Pre-Update
:PD_LOCAL_AMT := :M_PD_FOREIGN_AMT
:PD_FOREIGN_AMT := :M_PD_LOCAL_AMTThe problem that i am facing is while i UPDATE a record.
whats happening is when the form is in Query mode and if i change a record, lets say
change the value of the field PH_FXRATE, then what happens is, on screen i get all Detail
record's M_PD_LOCAL_AMT Calculated & Updated, but the actual db field PD_LOCAL_AMT remains unchanged
in the database after i press F10 or Save button.
The update takes place for the POH table and form displays 1 Record updated.
whereas if i have for example 4 detail records, then form should update those as well and display finally
5 records updated is'nt it..?
In query mode,if i insert new or modify an existing record in the detail block, then at this point, form marks just
that particular record as CHANGED. Thus making changes at db level only for this particular record.
what i want is once i make changes to the field PH_FXRATE, then form should mark all detail records
as CHANGED and on saving, the PRE-UPDATE tigger of POD table should come in to force and the changes
in the values of M_PD_LOCAL_AMT in turn to the db field PD_LOCAL_AMT should get affected at db level.
i have also tried to put these assignments
:PD_LOCAL_AMT := :M_PD_FOREIGN_AMT
:PD_FOREIGN_AMT := :M_PD_LOCAL_AMT
at PRE-UPDATE of POH table, thinking that form might consider
all detail records, at this point. i noticed that it does it, but only picks
1 record (i guess just the first record always) and change a db level.
No. 2 Issue:
i have put a POST-FORM-COMMIT at form level for auditing the Total fields of POH table against the details records.
Declare
M_LC_AMOUNT NUMBER(13,3);
M_FC_AMOUNT NUMBER(13,3);
Begin
SELECT SUM(PD_LOCAL_AMT) INTO M_LC_AMOUNT
FROM POD
WHERE PD_PHNO = :PD_PHNO;
IF :PH_PD_LOCAL_TOT != M_LC_AMOUNT THEN
:PH_PD_LOCAL_TOT := M_LC_AMOUNT;
END IF;
SELECT SUM(PD_LOCAL_AMT) INTO M_FC_AMOUNT
FROM POD
WHERE PD_PHNO = :PD_PHNO;
IF :PH_PD_FOREIGN_TOT != M_FC_AMOUNT THEN
:PH_PD_FOREIGN_TOT := M_FC_AMOUNT;
END IF;
End;i was testing and notice that in a query mode when all records are displayed.
if i go on changing values on records and save or save later keeping the form open,
form allows, but if 1 come back to a record which i may have changed and saved earlier, then it flashes Error;
"Records has been changed by another user, requery to ..."
i want to do an Audit before final db-Commit and keep the user free from this Error..
Please tell me first of all, is my approach for both of my issues,correct.?
if not, then please suggest what should be changed.
i'll highly appreciate for all your help. TYVM. Regards.I did exactly as you suggested. It works well for new record insertion
but when i press F7 to query it, its flashes messages before displaying detail records
Field must be entered.
Mr. Andreas,
i have problem only when i change value of PH_FXRATE. It re-calculates on screen values for M_PD_LOCAL_AMT
(Formula M_PD_FOREIGN_AMT/PH_FXRATE)
i want the changed value of M_PD_LOCAL_AMT to be saved in the actual db-field PD_LOCAL_AMT.
for this i have PRE-UPDATE on POD Table
:PD_LOCAL_AMT := :M_PD_LOCAL_AMT
:PD_FOREIGN_AMT := :M_PD_FOREIGN_AMT
Which is doing that.It is not marking the detial record as CHANGED.
I tried giving the above assignments in the PRE-UPDATE on POH table.
It saves the changed value in the db-field, but not all detail records, if more than 1.
what you have suggested, will get me acheived what i am looking for..? -
How to delete the master records when corresponding details records exist.
What is the SQL statement to delete the records of master when the corresponding detail records are present.
Note: No Cascade clause was used at the time of creation of referential integrity constraint.
"M"- Master Table
"D"- Detail Table
I used, "Delete from M cascade". This statement is not working.
Your favour in this will be deeply appreciated.
Cheers
PremChinHi folk,
i appreciate your suggestion,
my crux of the situation is to know whether there is a way to make it without disabling,removing or modifying the referential integrity constraint.
If so, modifying, please help me out how to modify the constraint in order to remove the master records keeping detail records in-tact.
Cheers
Premz -
Update issue in the Master records & detail records
Hi
Good Day !
Senario :
I have Master - Details Form , Master Block - A, Detail Block - B
In Master Block i have 10 records, For Each records in the Master will have related records in Detail ,
Requirement :
I want to reset records (some colums) in Master & then its related detail records in detail Block,
After updating the first master record & its detail record the next Master Master reord & its detail records should be updated respectively...
Can any one help on his, Its very urgent...
Below is my sample code... Pls guide me... Thanks in Advance
DECLARE
num_total_records1 NUMBER;
num_loop_i1 NUMBER;
num_total_records2 NUMBER;
num_loop_i2 NUMBER;
BEGIN
GO_BLOCK ('A');
FIRST_RECORD;
LAST_RECORD;
num_total_records1 := TO_NUMBER (NAME_IN ('SYSTEM.CURSOR_RECORD'));
FIRST_RECORD;
FOR num_loop_i1 IN 1 .. num_total_records1
LOOP
UPDATE table_name_1
SET columnA = NULL
WHERE clause
NEXT_RECORD;
END LOOP;
GO_BLOCK ('B');
FIRST_RECORD;
LAST_RECORD;
num_total_records2 := TO_NUMBER (NAME_IN ('SYSTEM.CURSOR_RECORD'));
FIRST_RECORD;
FOR num_loop_i2 IN 1 .. num_total_records2
LOOP
UUPDATE table_name_2
SET columnA = NULL
WHERE clause
NEXT_RECORD;
END LOOP;
commit_form;
END;declare
ln_rownum number;
begin
go_block('TEST_MASTER1');
first_record;
if :TEST_MASTER1.master_id is null then
message('No records selected');
message('No records selected');
raise form_trigger_failure;
end if;
loop
ln_rownum := to_number(:SYSTEM.CURSOR_RECORD);
update test_master1
set master_name = master_name||'Master '||to_char(ln_rownum)||' Updated'
where master_id = :TEST_MASTER1.master_id;
go_block('TEST_DETAILS1');
first_record;
if :TEST_DETAILS1.detail_id is not null then
loop
update test_details1
set DETAIL_NAME_NAME = detail_name_name||'Master '||to_char(ln_rownum)||' Updated'
where detail_id = :TEST_DETAILS1.DETAIL_id;
if :system.last_record = 'TRUE' then
go_block('TEST_MASTER1');
go_record(ln_rownum);
exit;
end if;
next_record;
end loop;
else
go_block('TEST_MASTER1');
go_record(ln_rownum);
end if;
exit when :system.last_record = 'TRUE';
next_record;
end loop;
commit;
clear_block(no_validate);
execute_query;
end;You hae take care of all validations. This is just a simple sample code.. -
Create Bank Details record but leaving the IBAN as blank
Hi Gurus,
I would like to ask if it is possible to Create the Bank Details record (IT0009) and Leave the IBAN field as blank?
We have this requirement to leave the IBAN as blank.
What we did was to make the IBAN field Optional in table T588M. We did our testing in the Development box and it worked provided that there is no Bank Detail record for the employee with IBAN record. If the employee has a previous record with IBAN in it, it wont allow us to save the entries without the IBAN. Is it possible to have the IBAN left empty? How do we proceed with that? How to configure?
Thanks in advance!Hi Christine,
Thank you for your quick response.
I cannot put ADMIN IBAN as space, because not all countries want to have the IBAN blank.
They only want it for some Personnel Areas.
How can I do such request? Thank you very much for helping. -
What is the proper way to record line numbers in Master/Detail records?
Guys and Gals,
Been thinking about this for awhile, but thought it best to ask the people who really know what they are doing.
What is the proper way to record & show line numbers in a Master / Detail record set?
For example, take Master/Detail relationship Orders and OrderItems. Orders has a column Document_Number and OrderItems has Document_Number, Line_Number. Line_Number should contain the row number 1,2,3,4 ... etc. for each row in a document.
Should I ...
<ol><li>Add a sequence and a trigger in the database? The FusionOrderDemo does this, but then the sequence never "resets" and I've got row numbers that keep incrementing. So one document has rows 4,5,6 and the next document has 7,8,9 when they should both have 1,2,3.</li>
<li>Programmatically take care of the row numbers? This seems like I'm asking for trouble. Anytime an insert or delete operation gets done, I'll have to iterate through rows and re-assign row numbers.</li>
<li>Is there a way to assign row numbers in a table iterator (or data collection?) to an entity?</li></ol>
Any suggestions would be appreciated. It's looking like #2 is my only option, but if anyone knows different I'd love the input.
WillThank you both guys.
As John said, I believe I'm looking for a gap-free sequence per master record.
The line number of the OrderItems table is the second half of the primary key. The first half of the primary key (DocumentNumber) is the foreign key to the Orders table.
Think of it like line items on an order or invoice. For example, if you were talking to someone on the phone concerning an invoice, you might say, "The pricing for line item #3 is incorrect." In this case, it's good to have a common reference. Or imagine a Microsoft Excel spreadsheet with no row numbers displayed! You'd never get anywhere if you had to explain something over the phone.
If this is tricky to perform, I take it using a sequence and trigger such as the Fusion Order Demo is the best way to approach the challenge for simplicity's sake?
Will -
How get all record from master and matching record from detail
hi master
sir i have master detail table
i have many record in master table but some record in detail table how i get
all record from master and matching record from detail
such as
select m.accid,m.title,d.dr,d.cr from master m, detail d where m.accid=d.accid
this query not work that get only related record i need all record from master
please give me idea
thanking you
aamirhi master
sir i have master detail table
i have many record in master table but some record in
detail table how i get
all record from master and matching record from
detail
such as
select m.accid,m.title,d.dr,d.cr from master m,
detail d where m.accid=d.accid
this query not work that get only related record i
need all record from master
please give me idea
thanking you
aamir
select m.accid,m.title,d.dr,d.cr
from master m, detail d
where m.accid=d.accid (+)The outer join operator (+) will get you all the details from master and any details from the detail if they exist, but the master details will still be got even if there are not details.
Note: Oracle 10g now supports ANSI standard outer joins as in:
select m.accid,m.title,d.dr,d.cr
from master m LEFT OUTER JOIN detail d on m.accid=d.accid -
View detail records from interactive report with button press
Hi I want to create a intractive report that will have a + sign for the user to expand the detail region below the record.
Thanks.
PKPthanks kartik,
I did exectly what is there in there. But I am having problem in display. I have put my application in
http://apex.oracle.com/pls/apex/f?p=44031:1
login as GUEST/password
select Company Accounts Management from Application Menu --> setup tab -> Companies from setup menu
the detail record is not displaying. correctly. -
Hi ,
I was trying to have a "SHOW ALL" feature on the master - detail page,
the detail table is an advancec table.
Please help me with inputs on how to have "SHOW ALL" feature,
Currently, we have to click on ":Show" for each record at master level to view the child data.
Trying to achive "Show All" Feature so that on click of this the master records on the page 'Expands" showiing all master records with respective detail records.
Regards
bhuvanmHi,
You should not set DetailFlag = "Y" in whereclause because there is no such record.
Also detail flag is transient attribute and not the query column, hence the error "Invalid indentifier".
I asked you to use DetailFlag as query column with static value "Y".
for example:
SELECT "Y" detail_flag
FROM <table_name>
This will display all the table records in expanded format. if you want it conditionally then use decode on some bind parameters.
For example:
SELECT DECODE(:1, "SHOWALL", "Y", "N") detail_flag
FROM <table_name>
This bind parameter should be passed whenever you want to execute query for the table.
Regards,
Sandeep M. -
Master Detail module returns to Master page after Detail record saved
Using Oracle Designer Editor version 10.1.2.0.2 I have generated a Web PL/SQL package
set up as a Master/Detail where the Master and Detail records appear in separate windows.
The Master window contains multi-records each with a link to the related Detail records.
The user clicks on the Detail link and the window that appears will allow the user to insert
a new Detail record. Once the user clicks the Save button I need the Detail window to disappear
and the focus returned to the Master records preferably after a new query is performed.
What are the steps I need to perform to navigate back to the Master page and close the Detail
page?
Thanks,
MarkThe simple answer is that to do exactly what you want would take some fundamental changes to the way the framework works. The actionInsert procedure does what it does - it saves the changes and redisplays the form. You can do post-generation changes to make it do something else, like return to the Master, but I'd advise against it.
But if you want a way to return to the Master window, where the user clicks a button or link on the detail form after saving changes, that we can do. Just make a note of the URL that does the initial display of the Master page - probably my_module_name$.startup. Go into the detail module component, and click the User Text tab. Then at Text Location, "Bottom of View Form" (or Top if you want the link there) add for a link:
htf.anchor('my_module_name$.startup','Return to Master')Or for a button:
htf.formOpen('my_module_name$.startup','GET')||htf.formsubmit('Return to Master')||htf.formCloseYou may need to set the SECECS preference for this module to "No" to get this to work.
An alternative to my method is to define an Action Item in the module that does a navigation. I often am linking directly to the View form for a master table, rather than a record list, as you are, and Action Items don't work well for that, but one might work fine for you. -
Portal Master-detail form how to auto assign detail record sequence number
Portal Master-detail form how to auto assign detail record sequence number.Please help me?
You can just read the following section
Can I specify a sequence number generator as the default value for a form column?
Yes. Enter the following in the "default value" field for the column:
#<schema name>.<sequence name>.nextval
where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
#SCOTT.CUSTOMER_SEQ.NEXTVAL
same way you can do for master - detail form.
for more information on forms please refer the following URL.
http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
hope it helps. -
How to print blank records after the detail records in a masterdetail report
Hi,
Developing a report for time and attendance record. In this report I am printing all the employees in a department, limiting the no. of records per page to 10.
I need to insert blank lines at the end of all of the detail records in a page that has less than 10 employee records so that the no. of records displayed on a page can always be 10(these blank lines will facilitate the management to note down the temporary employees who worked for the department but are not part of the department).
I am using a tabular form with group above layout.
The report layout is as follows:
Department : FINANCE & ADMINISTRATION
Employee Name | Employee Number |
1 Jim | 1234 | _________________
2 John | 5678 |__________________
3 blank
4 blank
5
6
7
8
9
10 balnk
Supervisor's Sign:______________________
Note: the no. of blank lines should be inserted dynamically based on the no. of emp. records being printed on the page.
Any help is greatly appreciated.
Thanks in advance.
Kavita.Your solution works when I am not limiting the no. of records per page for a department to 10 records and when I want to print blanks lines for the depts that has fewer than 10 employees in it.
Exactly in my report I have several dept's that has more than 10 emp's. In such cases I'll be printing first 10 in one page and the rest in the next page. Now I want to dynamically print the blank lines in the second page depending on the no. of emp's on that page. I tried to acheive this by using a CS column that reset's at page level but, REPORTS is not letting me use CS column that reset's at page level in a format trigger. I also tried to copy the CS value into a parameter and or to a Place holder column and did not help.
Any more work around ideas to acheive this?? please help.
Thanks alot
Kavita.
Hi
Create a column called Serial_No in ur emloyee query like this
select 1 , empno ,ename from emp;
Create a summary column on the serial column with the function SUM
and resetting it to Page
Display the column in the report by using the text color as white
so it doesn't display in the report
I think this should help u i believe
Sri
Hi,
Developing a report for time and attendance record. In this report I am printing all the employees in a department, limiting the no. of records per page to 10.
I need to insert blank lines at the end of all of the detail records in a page that has less than 10 employee records so that the no. of records displayed on a page can always be 10(these blank lines will facilitate the management to note down the temporary employees who worked for the department but are not part of the department).
I am using a tabular form with group above layout.
The report layout is as follows:
Department : FINANCE & ADMINISTRATION
Employee Name | Employee Number |
1 Jim | 1234 | _________________
2 John | 5678 |__________________
3 blank
4 blank
5
6
7
8
9
10 balnk
Supervisor's Sign:______________________
Note: the no. of blank lines should be inserted dynamically based on the no. of emp. records being printed on the page.
Any help is greatly appreciated.
Thanks in advance.
Kavita. -
How to print alternative colors in detail records in BI publisher?
Hi,
i have child or detail records. But i want to print them first record in red color,then second record in green color. Again third record color again in red color and fourth record again in green color.
Thanks,
laxHave two form fields after the grouping form field and use the following code in the first conditional form field:
<?if@row:number(position() mod 2)=0?><?attribute@incontext:background-color;'red'?><?end if?>
Include this in the second conditional format field.
<?if@row:number(position() mod 2)!=0?><?attribute@incontext:background-color;'green'?><?end if?>
Thanks,
Bipuser
Maybe you are looking for
-
Cp4: Paste identical background as separate library object
I need to paste an identical image as the background to several slides. It's important that the background image for each slide is a separate library object so I can do further edits without affecting the other slides. The first time I paste all is w
-
How to make text CSS text link with HOVER
How do I nake text links using CSS and the hover function? I am new to this Thanks
-
Hello everyone New to Aperture and I have a very basic question regarding keyword searching. I would like to search based on multiple keywords ex: Alexandra and Baseball. How can I search so that only files that contain only these two keywords are fo
-
E90 Communicator and viewing movies - problem :(
Hello, ive got a problem with my E90. When im using Video Manager to covert and send chosen movie to my cell phone it works very weard. Some movies working properly - others dont - other have only audio. no matter what quality i choose this situation
-
Bizarre, Dramatic Layout Changes with Font Formatting
Suddenly when I try to bold or italicize type, the entire iWeb page changes. The word/text I'm trying to format disappears, and all the text boxes expand and move down the page. Bizarre! Adding to the mystery, this doesn't happen with all iWeb templa