Home » Developer & Programmer » Forms » Displaying a warning message if no detail saved
Displaying a warning message if no detail saved [message #517394] Mon, 25 July 2011 12:36 Go to next message
jimbob123
Messages: 6
Registered: August 2010
Junior Member
Hi guys, on my form I have 2 blocks, block 1 which is the master and block 2 which is the detail. Both block 1 and block 2 are multi record blocks. For my form I want to display a warning message to the user if they create a master block without also creating a detail and was wondering if anyone could help me out with this as I am having difficulty.

Thank you.

Re: Displaying a warning message if no detail saved [message #517401 is a reply to message #517394] Mon, 25 July 2011 13:20 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Since you cannot create a detail block without creating the master block (if you have a relationship properly defined), you really only have to check if a record exists in the detail section.
Re: Displaying a warning message if no detail saved [message #517411 is a reply to message #517401] Mon, 25 July 2011 16:08 Go to previous message
jimbob123
Messages: 6
Registered: August 2010
Junior Member
Thanks for your input. Thats the problem im having, checking if there is a detail.

For example say the top half of my page is block 1 (master block) which is multi record block of say 5 records. The bottom half of the page is block 2 (detail records) which is also a multi record block of say 5 records. When user clicks on first record of top block he may say 1,2 or 3 detail records in the block below. If he clicks on second record of top block he may see the same, but they will be the details of the second record and not the first. The problem I am having is when I create a master block before the commit I somehow need to go through all the master block records and check they all have details and if not throw up a warning message. I am unsure how to do this however. Since the master block is multi record I can simply pass in 1 id to check in the detail I somehow need to cycle through all master records and check for a detail but in triggers such as post-forms-commit where I test it just before it is committed to the database I cannot use triggers such as go_block and next record to cycle through all master blocks and pass the id into my procedure etc.

Hope that makes sense and thanks for the help so far it is much appreciated.
Previous Topic: Exit_form in application server ....
Next Topic: Applet is not Opening in Browser
Goto Forum:
  


Current Time: Sun Sep 08 23:03:39 CDT 2024