Solved

Check Box event in Oracle forms

Posted on 2011-02-23
6
1,142 Views
Last Modified: 2013-12-19
I am new to oracle forms
I am trying to add a check-box event in a from built using table X. And my check-box is a non-database item that is not present in table X.

Now when checked it should enter a record into a Y table. If that event is in table Y it should be checked on post-query trigger.
Similarly when unchecked it should delete a record from table Y

And also I need to check a variable x1='.....' in table x that has to check with variable y1='.......' from table Y.

If the question is not clear then let me know..
0
Comment
Question by:r211
  • 4
  • 2
6 Comments
 
LVL 20

Expert Comment

by:flow01
ID: 34963387
What is your question ?

What do you want to happen when  the check in the post-query is false ?
0
 

Author Comment

by:r211
ID: 34963912
Post-Query trigger to check if the event is in the table when check box is checked

I wanted to know how to write those requirements in when-checkbox changes trigger. How to write it when it is using a table Y apart from using table X as object.
0
 
LVL 20

Accepted Solution

by:
flow01 earned 250 total points
ID: 34965696

a hint how it might look

when checkbox changed

begin
  if  :yourblock.checked = 'Y'
    insert into Y
      (col1, col2, ....)
    values
      (:yourblock.keyvalue1,  'fixedvalue2', ...);
  else
   delete from Y where col1 = :yourblock.keyvalue1;
end;


post_query

   begin
      select 'Y' into :yourblock.checked
      from Y where col1 = :yourblock.keyvalue1;
  exception when no_data_found then
      :yourblock.checked := 'N';
  end;
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Closing Comment

by:r211
ID: 34969534
Thank you...
0
 

Author Comment

by:r211
ID: 34973810
Thank you so much for your help...it worked...
0
 

Author Comment

by:r211
ID: 35008798
I have few more questions related to this question...

In X table on which the form was built contains 15 rows in which evt_name is the primary key

In Y table on which the check-box created has only 2 rows in which evt_name is the foreign key to this table.

Now I can insert or delete only one row that is present in both the tables. How can I insert other events that are not in table Y but present in table X
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now