How to query the master block based on one of the values in detail block
Hi,
In version 6i forms, I have a field in data block which is not set as a database item. I am using that field to store a value from detail block. If I want to query the form using that field (which represents one of the values from detail block), how do I do that? Any pointers?
TIA,
Do you want to query a master, which contains a specific detail? If so, here's an example how you could do it with a PRE-QUERY-trigger:
DECLARE
vcQuery VARCHAR2(4000);
BEGIN
IF :MASTERBLOCK.THE_DETAIL_SEARCH_ITEM IS NOT NULL THEN
-- Build up an exists Sub-Query
vcQuery:=' MASTERBLOCKID IN (SELECT FK_TO_MASTERBLOCK FROM DETAILTABLE WHERE DETAIL_COLUMN=''' || :MASTERBLOCK.THE_DETAIL_SEARCH_ITEM|| ''')';
END IF;
SET_BLOCK_PROPERTY('MASTERBLOCK', DEFAULT_WHERE, vcQuery);
END;
Similar Messages
-
Searching master block based on value in detail block
I have two blocks on a form. A master block for purchase orders and a detail block for the line items. I need to provide users with the ability to search the purchase orders based on the values entered into the detail block (line items), during the query entry. I am considering to check to see which block the cursor resides by using the :SYSTEM.CURSOR_BLOCK variable, then retrieving the value from the current item and running a query, using that query. The problem is that I am not very familiar with Forms and do not know how to implement my idea. Any ideas?
nullI copied you an example from metalink. Hope it will help.
Doc ID:
Note:109583.1
Subject:
How to query a Master record from a Detail Block
Type:
BULLETIN
Status:
REVIEWED
Content Type:
TEXT/PLAIN
Creation Date:
22-MAY-2000
Last Revision Date:
03-AUG-2001
PURPOSE
------- To query a master record from a detail record. DESCRIPTION
=========== The user would like to enter a query criteria in the detail block
and then query the master record based on the above user input. SOLUTION
======== Create the master and detail blocks and the relationship in the usual
manner. We will consider here the blocks DEPT and EMP based on the
SCOTT schema. 1. Create a KEY-ENTQRY trigger at the block level of the detail block
(EMP) and add the following code in it : GO_BLOCK('dept');
CLEAR_BLOCK(no_commit);
GO_BLOCK('emp');
ENTER_QUERY; 2. Create a KEY-EXEQRY trigger for the detail block and add
this : EXECUTE_QUERY;
:global.deptno := :emp.deptno;
:global.flag := 'T';
GO_BLOCK('dept'); This will store the value of the deptno (primary key) in a global variable
:global.deptno and set another global variable :global.flag to 'T'. This
will be explained as we progress. 3. Create a WHEN-NEW-RECORD-INSTANCE trigger for the detail block
and add the following : -- This is used to populate the MASTER block with the corresponding
-- record whenever the user navigates through all the records in the
-- DETAIL block if get_record_property(:system.cursor_record,:system.cursor_block,status) = 'QUERY' then
SELECT rowid,deptno,dname,loc
INTO :dept.rowid,:dept.deptno,:dept.dname,:dept.loc
FROM dept
WHERE deptno = :emp.deptno; -- This is to set the status of the record populated
-- to QUERY and not to create a new record SET_RECORD_PROPERTY(1,'dept',status,QUERY_STATUS);
end if; 4. Create a WHEN-NEW-BLOCK-INSTANCE trigger for the master block again
and add this : if :global.flag = 'T' then -- set the variable to a different value
:global.flag := 'F';
:dept.deptno := :global.deptno; -- This will query the master table for the record based on the
-- deptno of the detail table which is stored in :global.deptno -- For ex: if an employee of department 10 has been queried in
-- the detail, then the global.deptno will have the value 10,
-- which is used in the query below to fetch the master record. SELECT rowid,deptno,dname,loc
INTO :dept.rowid,:dept.deptno,:dept.dname,:dept.loc
FROM dept
WHERE deptno = :global.deptno;
set_record_property(:system.cursor_record,'dept',status,QUERY_STATUS);
GO_BLOCK('emp'); end if; EXPLANATION
=========== Actually in the above method we are using the base table blocks as a
non-base table block when we query the master from detail. We are
displaying the master record fetched from the table based on
the query supplied in the detail. So after the fetch, if we clear the
block or form then we get a "Do you want to save the changes you have made"
alert. So in order to supress this while entering a normal master-detail
query, we have created the global variable, :global.flag. There is a limitation though, if you query detail records and then
navigate to the master block and then press the down arrow( i.e.,
navigate to the next record) and then presses the up arrow to
navigate back to the same record, then the detail records that
were originally populated will change and a new set of records will
get displayed. This is because the normal master-detail query is
taking place during MASTER record navigation. This can be controlled by creating a flag (global variable) and setting
its value and thus preventing the user from navigating to the next master
record. Do the following : 1) In the KEY-EXEQRY trigger of the detail add the following :global.control_master := 1; 2) Create a KEY-EXEQRY for the master and add this : :global.control_master := 0;
EXECUTE_QUERY; 3) Create a KEY-DOWN in the master with the following in it: IF :global.control_master <> 1 THEN
down;
END IF; Declare all the global variables before running the Form. RELATED DOCUMENTS
Note:611.1 -
I am in Graphic Design school and we are studying Dreamweaver CS5. One of the projects is to create a new page based on one of the 16 samples available which is the 2 column, fixed, left sidebar, header and footer option.
However, in CC Dreamweaver, I only see the 2 column, fixed, right sidebar option.Change line 62 to
float: left; -
How can I Publish to a Folder just one of the several websites I have created using iWeb?
How can I Publish to a Folder just one of the several websites I have created using iWeb?
it drives me nuts having to emove all the other websites when I want to upload one.
SparrowFor iWeb, I like to do only one site per domain file. I move domain files out of the Application Support folder and place them inside project or client folders, or in DropBox. Once you duplicate a domain file and begin customizing it, it will load and behave as a separate project/site.
I publish each iWeb domain/project direct to a server via FTP. Sometime I publish to a folder, then upload via FTP manually.
iWeb is a remarkable tool, especially when you work from scratch with blank tamplates
Here are a few of my iWeb sites:
http://www.newcovenant.org
http://www.visionmultimedia.org
http://www.visioncomsolutions.com -
i just bought my first imac i have 2 seperate drives on it. how do i move photos and documents from one to the other.
This is our resident iPhoto guru, Terence Devlin's, advice:
You can move your iPhoto Library to an external or secondary internal disk:
1. Quit iPhoto
2. Copy the iPhoto Library Folder as an entity from your Pictures Folder to the External Disk.
3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space. -
Is there a way to change the master text length in FCP? The default length is 10 seconds, which is too long. I can easily adjust the length but I don't want to do it each time, and I don't want to adjust a text clip and then have to copy and paste this each time. Ideally, there should be something in User Preferences but there is not. Thanks.
Maybe some one else can pipe up with a solution, but this would literally take 2 seconds to do for a new project. And you can create a "template project" that includes this "text" clip. Save this project and then to a get info and check "stationary pad." When you double click on this file, fcp will open with a copy of this project and you just need to do a save as.
I've been working with computer editing systems for longer than i can remember and at a certain point you just have to adapt your workflow to the limitations of the software. -
I'm creating a book format in Pages. I want the page count to be 1 on the first page of chapter one after the title page, table of contents, etc.. How do I do that?
That is not the issue.
Pages/OSX does not save files with crop marks and bleeds.
It also by default saves transparency, which is involved in a lot of Pages' better features, at a rubbishy 72 dpi resolution.
It also makes it extremely difficult to maintain mono-color like black only text, has no spot color and makes color management opaque.
It really is only meant for amateur publishing and printing to your desktop printer.
A commercial printer who is willing to use and print from Pages may have better results but at the cost of considerable micro-management which defeats the point of this "cheap" solution.
Peter -
How do you change the language to English in Photoshop CS5 after installation is completed? When I installed the program, English was not one of the language options so now everything reads in spanish. I can not read in spanish. Please help!!
Hi mujabee1111,
Please uninstall the application from your machine and then use the link below to download the installer for the CS5 download in English language:
Download CS5 products
Regards,
Sheena -
We have 2 iphones both synched to 1 ipad how do we reovw phone numbers from only one of the phones
We have 2 iphones and they are both synched to an ipad, how do we reomve phone numbers from only one of the phones without hte numbers being removed from the other phone
one can't sync iPhones with ipads
best you can do is to sync all with iclouds
if you do so and wish to stop syncing contacts with one of the iPhones you have set it not to sync contacts in the settings of the iPhone -
How do I resend an invite email for one of the user in my Aruba Central account?
Q: How do I resend an invite email for one of the user in my Aruba Central account?
A: Aruba Central allows administrator to create multiple user of different access levels to help manage the system. As new uses are created by administrator, an invitation email is sent to the user's email address to activate the account.
In certain situations, these emails get into spam or junk folders with no visibility to end-user. These are cases, where re-sending an invitation email is of much helpful.
Follow these steps to resend invite email to a specific user:
Login to Aruba Central and click on "All Groups"
In the left-menu, click on "Maintenance" and then "User Management"
Clik on "Resend Invite email" and mention the email address you wanted to send the invite again:By default, the Menu Type option for menus is set to Top Level Pages. You can change this behavior by choosing Menu Type > All Pages from the menu options. The steps to do this are described in Adding a Horizontal Menu widget
-
With OS X10.9 the Mail window (after hitting reply or forward) grows ridiculously long, sometimes 4 times the width of the screen and would not allow me to readjust the window size. Any one has the same problem? How shall I go about fixing it? (Thanks)
I'm having the same problem. I've tried going into the Library and deleting the mail plist file(s), which fixes the problem, but only temporarily. Would appreciate any help here too!
-
Hello,how can i contact the owner for the stolen iphone using email?because i call the owner no phone,no one accept the call..
Unless you have the owners email address you can't email them.
If you have found a stolen iPhone and are trying to return it to its rightful owner, hand it in to the police. -
hi, how can i have a live chat with one of the people from apple so i they can help me with my problem?
https://getsupport.apple.com/Issues.action
-
How to get the Output File Name as One of the Field Value From Payload
Hi All,
I want to get the Output file name as one of the Field value from payload.
Example:
Source XML
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_TEST xmlns:ns0="http://sample.com">
- <Header>
<NAME>Bopanna</NAME>
</Header>
</ns0:MT_TEST>
I want to get the Output file name as " Bopanna.xml"
Please suggest me on this.
Regards
BopannaHi,
There are couple of links already available for this. Just for info see the below details,
The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
// Description: Function to create dynamic Filename
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
With this udf map it with the MessageType as
(File Name field from Payload) > DynamicFileConfiguration>MTReceiver
Thanks
Swarup -
I want the title on the browser to change when one of the frames changes in the Frameset.
I am using frames (please don't tell me off!) and PHP.
I want the title on the browser to change when one of the
frames changes in the Frameset.
Normally the title of the browser comes from the Frameset,
But I am sure I have seen websites where the title changes
depending on one of the frames... how is this done?
CThen don't use frames.
> Normally the title of the browser comes from the
Frameset, But I am sure I
> have seen websites where the title changes depending on
one of the
> frames...
> how is this done?
Show us one and we'll tell you.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"colinwalton" <[email protected]> wrote in
message
news:epuu1t$kgv$[email protected]..
>I am using frames (please don't tell me off!) and PHP.
>
> I want the title on the browser to change when one of
the frames changes
> in
> the Frameset.
>
> Normally the title of the browser comes from the
Frameset, But I am sure I
> have seen websites where the title changes depending on
one of the
> frames...
> how is this done?
>
> C
>
Maybe you are looking for
-
I own a mid-2012 Macbook Pro with the 15" high resolution screen add-on (it's the model that was released alongside the new retina versions). The processor is a 2.6 GHz Intel Core i7. I run OS X 10.8.4. I'd like to know if the following behavior is n
-
Hi All, I have created one report in crystal report using Hierarchy, the op of the requires as bottom up approach. Eg: Suppose we are having Media at the top most Hierarchy, bellow Media we have International Media and National Media. Bellow Interna
-
Fine Tearing when scrolling pages, norm?
Hi All Whenever I scroll quickly down web pages, the main directory of all the boards of this forum is a prime example. The problem is similar to tearing but it more just affects text causing it to appear and to disappear and reappear quickly. It is
-
HT204291 how do i turn airplay on on my ipad
are only some of the apps airplay compatible or do i need to do something on the ipad as none appear to be showing the airplay symbol
-
Hi How to assign both internal & external no ranges for vendor no range. Regards Ram