Problem with the join relationship condition master / detail

Hello
I need to join with master detail such as if there is no trace of the foreign key in detail to the primary master key, the foreign key must be attached to another column based on certain conditions in the master. For example:

Control columns: pk1, rk1, rk2
Detail of the columns: fk1, a, b, c

I created a relationship with detail with the join condition, pk1 = fk1 in master.
But according to value rk1, I actually join fk1 to rk2 in master and if the condition fails then join the pk1. I can't put this condition in the relationship that the form does not accept complex join conditions.

I hope that my example has not confused everyone.

Can someone help me to achieve this goal.

TIA

TIA,
I agree with DM, rather than using the RELATIONSHIP between the blocks that I would create logic to manually set the DEFAULT_WHERE clause on the block of RETAIL with the criteria you need to MASTER block. This can be a little difficult if you want to form work the same way if you had defined a relationship because you will have to create all the triggers event coordination. The most difficult part is to choose the right triggers to coordinate the synchronization when a user accesses a folder of master to another. For just the basics (the block of retail is questioned when the user navigates to the retail block), you could do the following:
1. create a When-new-folder-Instance trigger on the Master block to capture the relevant details to query the block detail and define the DEFAULT_WHERE.
2 create a trigger in a times - news - block - Instance on the block of retail to run the query on the block of retail and display the details records.

For example:

/* Sample When-New-Record-Instance trigger */
DECLARE
     v_temp_where          VARCHAR2(500); /* make larger if needed. */
BEGIN
     IF ( :MASTER_BLOCK.First_Item IS NOT NULL ) THEN
          /* this is needed for when the user navigates to a NEW record in the MASTER Block. */

          /* Add your conditional logic here to determine how to build your WHERE clause */
          IF ( RK1 = 'Dependent Values' ) THEN
               v_temp_where := 'PK1 = FK1';
          ELSE
               v_temp_where := 'RK2 = FK1';
          END IF;

          Set_Block_Property('DETAIL_BLOCK',ONETIME_WHERE,v_temp_where);
          /* If you are using Forms 6i, the ONETIME_WHERE property is not available so you will have to */
          /* use the DEFAULT_WHERE property instead. */
     END IF;
END;
/* Sample When-New-Block-Instance trigger
BEGIN
     /* This sample code assumes the user has not navigated to a New Record */
     /* so there will always be a NOT NULL default where assigned to the DETAIL BLOCK.*/
     Clear_Block(ASK_COMMIT); /* just in case the user made changes... */\
     Execute_Query;
END;

Please understand it is the EXAMPLE of Code and is intended to be a starting point for you - not the complete solution.

I hope this helps.
Craig...

If a response is appropriate or useful, please mark accordingly

Tags: Oracle Development

Similar Questions

  • Problems with the installation of CS4 Master Collection on Mac (current Yosemite). Download seems to be going OK, but nothing will be installed.

    I try to install CS4 Master Collection on my other computer (Mac Air) and may not have to work. Download seems to be going OK, but the part of the installation is where I have a hang up.  I've got my series #s Adobe Creative Suite Premium (2007 - ouch!) and CS4 Master Collection. Any suggestions on how to download this or other options?

    Long story short... I finally got to work, thanks Jeff.  I had downloaded the CS4 Master Collection originally, but it has not been installed properly... I finally all the old stuff uninstalled and then was able to install the Master Collection.

    Mystery solved!

  • Relationship need master / detail to post a link Master column to the different retail pass 2

    I have a form with a relationship master detail. The main block is a rec_shipments of table of database with a primary key of the shipment_id and a bunch of other columns. The retail block is a rec_containers table with a container_id as the primary key most column shipment_id, split_shipment_id, weight, volume, etc. The shipment_id and the split_shipment_id are nullable.

    When a shipment is received a shipping record is created and container records are created with the populous shipment_id and the split_shipment_id null. Under the shape of what a relationship is created between the block of the expedition and the block container as shipment_id = shipment_id. It works very well. However, they have the ability to spit the original containers in small containers easier to manage for the distribution. For example, if they receive a railroad car full of pallets of printer paper they can take and divide the, 1 tray of rolloff half-and-half into another tray of mitigation. The bins of rolloff will get a unique container_id for follow-up. Registration in the system created in the rec_containers table will be the populous split_shipment_id and the shipment_id null. On the screen, they want to see the (railroad car) original containers and containers of split (ferries rolloff) when the query expedition.

    What they want:
    Shipment_id - and additional information
    ID drive to railway and additional information
    Rolloff Bin 1 ID and additional information
    Rolloff Bin 2 ID and additional information

    My problem is the attenuation of bins do not arise with the current relationship because the shipment_id is set to null in the 2 files of bin rolloff.

    I tried to create a view on the rec_containers table that is all columns in the table plus 1 additional column which is
    NVL (shipment_id, split_shipment_id) comp_ship_id

    then assign the relationship shipment_id = comp_shipment_id. I have the comp_shipment_id column value query Yes and insert & update or not because I don't want to not update this column in the view.

    The problem is I can't update all the columns, I get a cannot book record to update or delete the error.

    Does anyone have any ideas how I can get the block of containers to query all records where the shipment_id or the split_shipment_id is shipping block shipment_id and still be able to update the records?

    Thanks for any help.

    Your idea of using a view is the best approach. To perform the update block, you have OHS 'Query' property only for your item derived to 'yes '. Witn, the column will not appear in any other dml. On lock... maybe the forms is no longer able to make a regular blocking when a block is based on a view. In this case, put a LOCK ON trigger on the block and lock the record for yourself to SELECT for NOWAIT UPDATE on registration. Just try if it would work, you use a NULL value in the POCKET ON right to xheck if dml himself operations will work. If your view is based on a single table, you have a good chance that there is nothing to change, if you get an error like 'Unmodifiable view', you need to make some additional adjustments
    -Choose the Mode key for the block to 'uneditable '.
    -Set the 'primary key' property to 'Yes' for the pk-point in your block.

    hope this helps

  • Problem with the change of payment details

    Hello

    I tried many times to update my credit card payment information, but I can't change the 'old'.

    I still got the message "there is a problem with the information of card entered here. Please enter another card or contact your bank. »

    The card is newly issued and is on the name of my company. I paid her for other accounts online without a hitch, then there is no problem on my side.

    I use a Mac and Google Chrome.

    Is it possible for me to provide details by e-mail and make the change?

    I await your response and thank you in advance,

    Cristina

    This is an open forum, not Adobe support... Click below to contact Adobe staff for help

    While the forums are open 24/7 you can't contact Adobe support at any time

    Chat support: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • I bought for the Adobe Master Costume CS5.5 product packaging a few years back and today I get the following message appears: "Configuration Error: there was a problem with the license of this product." You restart the computer and restart production

    I bought the Adobe Master Costume CS5.5 product packaging a few years back and today I get the following message appears: "Configuration Error: there was a problem with the license of this product." You restart the computer, and restart the product. Error 213:19 ".

    That was before Adobe moved to a payment structure based on participants. I need to be able to access these programs. Please provide a solution to the problem.

    order to C:\ProgramData\Adobe & C:\ProgramData\Adobe\SLStore folders full reapply administrators property back on the C:\ProgramData folder and then add everyone.

  • problem with the help of the conditional formatting on a cell that is defined as the percentage

    Hi all

    I am facing a problem with the help of the conditional formatting on a cell that is defined as the percentage.

    I am using beaches for example:

    is equal to or greater than 10% - green color

    5%-10%-yellow

    less than or equal to 5%-color red


    the problem is that keeps the value 10% get yellow color when it should get green.


    i thought that is a rounding issue but when I change the definitions of the cell to learn more decimal places I see this part of the percentage 9.65% and some of them are 10.00% and they are both colored in yellow.

    I also tried to change the way range of 6 to 9%, but values between 9.65% or 5.5% are not colored.


    I really enjoy your help!

    You know the reason and the solution.

    change the format of the column and go or add a column more with decimal and opt for conditional and hide report.

    Thank you

    http://cool-bi.com

  • Problem with the conditional tags in printed output

    I write help files for different versions of our software - version 4 and 5 using Robohelp for HTML 5.0.2

    There is a large overlap of information between the two, so I use a help file joint with marked topics that are specific to version 4 or version 5.

    I went out and then use with 'NOT v4' or "NOT v5" as the conditional tags.

    It works fine in the HTML output. However, I encountered problems with the printed output.

    Ideally, I want the help file using the option "generate the single document" because it means that the document produced, without the single output field. However, when I do, the tags conditional build fail and I get a piecemeal result.

    If I generate the document by using the option 'generate individual documents' tags conditional build work, but I get the only field I want to avoid.

    Does anyone know how to get the conditional tags to work when the option "generate the single document" is selected?

    Pierre and HKabaker - thanks for your comments.

    I think I have the answer now.

    In the properties for the SSL Print dialog, the third screen is the dialogue of section layout. I had removed some sections in the right pane (for example, the default title page, glossary, and index) because I did not want them to appear in the final printed output. It seems that without these sections present conditional compilation tags do not work correctly when the document is released by using the option 'generate a single document ".

    I started again with a "blank" printing of SSL version. Conditional constructions using the "generate a single document" appear to work fine when I leave the dialog layout intact section.

    I can even do the conditional tags build an injustice because the option "generate a single document" (after that I made the changes in the dialog layout section) seems to be that some of the chapters in the table of contents and omitting others.

  • I have some problems with a ONE_TO_MANY relationship, can not insert the record

    I have some problems with a ONE_TO_MANY relationship:

    Imagine the following entities:

    -J' have an operational entity with a relationship to workers one_to_many something like:
    @SecondaryKey(relate = Relationship.ONE_TO_MANY,
        relatedEntity = Worker.class)
        private Set<String> workers;
    -The category of workers is a simple annotated entity.


    Now, I want to do the following and I get the error:

    -Create a bunch of tasks
    -Insert tasks into the entitystore
    -create a set containing all the tasks of primary key
    -involve workers to tasks
    -Insert the task in the database


    The above procedure works fine, but when I try to associate the same set of workers with another task I get an exception like:
    com.sleepycat.je.DatabaseException: (JE 3.3.75) Could not insert secondary key in persist#Sample#sample.Task#workers OperationStatus.KEYEXIST
            at com.sleepycat.je.SecondaryDatabase.insertKey(SecondaryDatabase.java:887)
            at com.sleepycat.je.SecondaryDatabase.updateSecondary(SecondaryDatabase.java:807)
            at com.sleepycat.je.SecondaryTrigger.databaseUpdated(SecondaryTrigger.java:42)
            at com.sleepycat.je.Database.notifyTriggers(Database.java:1735)
            at com.sleepycat.je.Cursor.putInternal(Cursor.java:1368)
            at com.sleepycat.je.Cursor.putNoOverwrite(Cursor.java:498)
            at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:366)
            at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:315)
    Can someone please clarify what my problem is and where I should change for this case study work?

    Thank you

    The above procedure works fine, but when I try to associate the same set of workers with another task I get an exception like:

    The table in this javadoc should help. Please think about whether they are 1 of many, many 1 or many is the appropriate link.

    http://www.Oracle.com/technology/documentation/Berkeley-DB/je/Java/COM/Sleepycat/persist/model/SecondaryKey.html#relate)

    -mark

  • problem with the installation of window package

    Impossible to install, i-tunes, quick time and I downloaded Security software. Error message indicates a problem with the windows package install. On Vista, this is a fairly new problem
    Thanks in advance
    Jack

    Hi Jack8053,

    Thank you for visiting Microsoft Answers.

    · The error message you get when you try to install a software, what exactly?

    · Remember to make changes on the computer before this problem?

    It seems to be that some of the files windows install is corrupt. I have a few steps that might help you to solve the problem:

    Method 1

    Make sure that the Windows Installer service is running.
    1 open run and type services.msc, and then press ENTER.

    2. in the services window, locate the Windows Installer service in the services list.
    3. check that the status is "started". If the condition column is empty,
    Right-click Windows Installer, and then select start.
    4. change the Startup Type to automatic (default is Manual), then
    Restart the computer.

    Method 2

    Run a scan of the file system [SFC] checker on the computer that will replace missing or corrupt files.

    To do this, follow the steps below:

    1. click on the Start button.

    2. on the Start Menu, click all programs followed by accessories.

    3. in the menu accessories, right-click on command line option.

    4. in the drop-down menu that appears, click the "Run as Administrator" option.

    5. If you have the User Account Control (UAC) enabled, you will be asked permission before the opening of the command line. You simply press the button continue if you are the administrator or insert password etc.

    6. in the command prompt window, type: sfc/scannow then press ENTER.

    7. a message is displayed indicating that "the system scan will start.

    8. be patient because the analysis may take some time.

    9. If all the files need replace SFC will replace them. You may be asked to insert your Vista DVD for this process to continue.

    10. If all goes although you should, after the analysis, see the following message "Windows resource protection not found any breach of integrity.

    11. once the scan is finished, close the command prompt window, restart the computer and check.

    For more information, see the link below:

    How to repair the operating system and how to restore the configuration of the operating system to an earlier point in time in Windows Vista

    http://support.Microsoft.com/kb/936212

    Method 3
    1. If it does not help, try to uninstall Windows install using the Windows Installer Cleanup utility:

    Description of the Windows Installer Cleanup utility

    http://support.Microsoft.com/kb/290301

    2 restart the computer.

    3. download and install the latest version of Windows Installer by downloading from the link given below:

    Windows install 4.5 Redistributable

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

    4. try to install the program and check that it works.

    Hope the helps of information. Please post back and we do know.
    Concerning
    Joel S
    Microsoft Answers Support Engineer.

  • I started having problems with the wireless mouse and the carpet of my laptop - Lenovo ThinkPad T420 mouse.

    Original title: right click on the mouse itself activating

    I borrowed a USB to a person at work and I started having problems with the wireless mouse and the carpet of my laptop - Lenovo ThinkPad T420 mouse. The left click of two devices works normally, however, sometimes she does not respond to clicks and it takes a few seconds to work. The left button was constantly starts to turn on, as if he was stuck. After that I hit Alt + Tab and modify windows it stops for a few moments and starts at a later date. I havo not found a specific condition or a combination of keys that may trigger the fault.

    I read a few posts on discussion forums, but all say that it could be a hardware problem, which I think is not, because both devices have the same problem and I'm sure it all started with the insertion of the borrowed memory stick. I scanned the readers to help Symantec's EndPoint Protection and installed Microsoft Security Essentials and performed a full scan, but found nothing. I even restored the system, but the problem remains.

    Should I get a different antivirus? How can I find the cause so I can find a better targeted solution?

    Try to install the drivers from this link and check.

    http://support.Lenovo.com/en_US/research/hints-or-tips/detail.page?&LegacyDocID=MIGR-77167

  • Problem with the simple query.

    Hi all

    I am facing problem with the query below

    Select A.COL1, A.COL2

    B.COL1, B.COL2

    FROM TABLE1 A

    TABLE 1 B

    WHERE A.header = '123'

    AND B.header = '123'

    AND nvl (A.COL6, 'ABC') = 'ABC '.

    AND NVL (B.COL6, 'DEF') = 'DEF '.

    Basically, my requiremenyt is: I have only one table, TABLE1 here, which has a line two lines (for the same header) as "ABC" and another is "DEF". Table 1 has two columns (col1, col2) that should be displayed for both lines.

    When the header has two records in table1 top query works. and but if I do not have a record for any header example there are a record for "abc" in col6 only. so my query above does not work because there is no record for 'DEF' in col6. But I want to again request to fecth the output (for b.col1 and b.col2 should have null values)

    could you pls suggest me how to get the 4 columns.

    Thanks in advance

    Kind regards

    UVA.

    Try to place the status of outer join on column: analytical_criterion_code as

    and nvl (AUDIT.analytical_criterion_code, 'AUDIT2') = 'verification2. '

    .

    .

    and nvl (TRANS.analytical_criterion_code, 'TRANS2') = 'TRANS2.

    In the sub query based on the opinions that you have given in post # 1, although there is no value "DEF * ' for col6 due to the condition of outer join on b.col6 (+) line is extracted with b.col [1,2,3] as NULL values. Try to remove the (+) sign b.col6 and test.

    with t as)

    Select 111 col1, col2 'aaa', 'ABC' col6 123 header of all the double union

    Select 222 'bbb', 'DEF' col6, 123 double header

    )

    q as (select 123 double header)

    Select A.COL1, A.COL2, A.COL6

    B.COL1, B.COL2, b.COL6

    q.header

    T a

    t b

    q

    where a.col6 (+) = 'ABC '.

    and b.col6 (+) = "DEF."

    and q.header = a.header (+)

    and q.header = b.header (+)

  • Firefox and serious problems with the police on the websites bloglike.

    Firefox on my computer has some serious problems with the police on some sites, such as: twitter, tumblr and a few other bloglike.

    Images:
    Twetter / thumblr / other

    Yes, it is more likely a hardware acceleration problem or a problem with the specific fonts (rendering).

    You can do a test of fonts to see if you can identify the corrupted fonts.

    You can use this extension to see what fonts are used for the selected text.

  • Problem with the volume on Satellite Z30 control - A

    Hello

    I have a problem with the analog output sound on my A - Z30 (internal and line/headphone speakers). If for example I play music I see a clearly weak signal volume on the fader control of volume in my Win 8.1 source volume control. But on the master fader, I get a completely saturated and distorted signal. Even down to the time source and output does not help... it just sounds horrible.

    See: link: [https://dl.dropboxusercontent.com/u/30325547/SoundProblem.jpg] (sorry, it's a German system)

    Here we can see that the (extreme right) music player delivers a signal of low volume, while the master fader (left) receives a 100% volume distorted signal.

    If I use external speakers that connect via USB (Logitech Z305) it works perfectly.

    I have already uninstalled and reinstalled the latest version of the drivers for my sound card. But this problem is very persistent. It seems that something pulls the signal up, but I can't find any control that turns off.

    I'm not completely sure when that started, but it can be connected with the beginning of the use of a USB headset. But I already uninstalled this software once again, but that did not help as well.

    Any idea?

    Thank you very much

    PHILIPPE

    Hello

    According to the specifications of the laptop and drivers available on the Toshiba driver page, this laptop supports the Realtek sound card.
    That's why the Realtek HD audio Manager software should be available in the control panel.

    Realtek HD audio Manager provides different parameters as well as the speaker of the configuration options to get the best sound performance.

    In addition, computers laptop Toshiba are preinstalled with a sound tool DTS/Soft
    This software provides audio improvements in your computer.

    To be honest, I not quite sure what which could affect your sound volume, but the mentioned tools and configuration should be checked permanently m.

  • Since 10.11 I have not been able to download via the usb port of my Davis Vantage weather station. No solution of tech Davis on the issue even with the new recorder of events in the resort. Is there a problem with the usb?

    Since 10.11 I have not been able to download via the usb port of my Davis Vantage weather station. No solution of tech Davis on the issue even with the new recorder of events in the resort. Is there a problem with the usb?

    What Mac? (details)

  • Satellite A300-1MZ - Smart tool recognize problems with the drive

    Hi all...
    I have a * a300-1mz * I * a problem with the hard drive *.

    [This | http://img96.imageshack.us/i/diskinfoe.jpg/] is the _screen to a s.m.a.r.t. pens (* Disc 3.3.0 * Info) who acknowledge some problems with the disk.

    Can I send the laptop as collateral for a free replacement of the same disc?

    Among other things, sometimes * the computer freezes * no option to manually turn off the laptop (I think it always comes from the same disk):
    the screen stays fixed and 'Win Vista' does nothing comands.
    same "ctrl + alt + delete" Task Manager does not. The disc indicator light remains lit, but itself no longer believes it works

    Hello

    > Can I send the laptop as collateral for a free replacement of the same disc?
    If the authorized service provider can notice this problem too, you can get a new HARD drive for free. The ASP will order it and swap it out. It is a free procedure if your laptop is under warranty.

    > sometimes the computer crashes
    The HARD drive is perhaps the reason for this?
    Contact a service provider authorized giving them all the details and information. They can fix that also. :)

Maybe you are looking for

  • Favorites alphbetize

    I use Firefox 24.0 and I would like to know how to alphabetize my favorites. Right now they are in every sense.Thank youJerry

  • J6480: duplexing on j6480

    Since installing win 10 win 7 duplex printing does not work on my J6480 all in one. I have the last available at HP installed software HP, but still no luck. I checked all the usual suspect as a control to ensure that the function has been enabed and

  • Change the info at the bottom of page

    I changed jobs and at the bottom of my emails, I have information, but for the life of me I can't find where to change the information, I change my profile.

  • HP laptop - 15-g221au: Hi, I am not able to connect to the internet. WiFi works do not.

    Hi, I am unable to connect to the internet. WiFi works do not. not able to find the right drivers for 32 bit win.7. need urgent help...

  • Install the TOOLS HP Partition in HP Pavilion dv6529em

    The hp pavilion dv6529em was fully functional and load.  Laptop has been moved and the plug of the charger is removed unintentionally.  Laptop was turned off, charger off the power and then reconnected to the laptop.  Now, laptop is recycled during t