Use of propper triggers

hi,
I have a table with the following field
table name test
field datatype
id number(4)
name varchar2(20)
date date
using form wizard i created a form using these fields
then i created a control block on the from below test block with the following buttons and triggers with codes
new button
when_button_pressed_trigger
clear_form;
this button clears the form and make it blank
save buttom
when_button_pressed_trigger
insert into test (id,name,date) values (:test.id,:test.name,:test.date);
this button insert the record into the database from the form
delete button
when_button_pressed trigger
delete from test where id = :test.id;
this button delete selected record from the database
update button
when_button_pressed trigger
update test
set name = :test.name,
set date = :test.date
where id = :test.id;
this code to update the existing data
now how do i enable and disable these buttons at runtime
what i want to do is that when the form loads the save button should be disabled and enabled only when the use clicks new button how do i do it
please help me with this
Thank you
Monty Sen

You can enable and disable buttons using the set_item_property built-in. The when-new-form-instance trigger will run once when you load the form.
However... You do not usually write SQL Insert, Update or Delete statements in a form. Forms automatic processing does this for you in the background. All you need is a single SAVE button with this command: Commit_Form;
That command tells the form to insert the row using the data you have entered into your base-table block. Once you have saved the record, you can change the values and use the Save button, and the changes will be updated in the database. And deleting is accomplished the same way.
Please learn how to use all the automatic features of Forms before you start writing SQL statements.

Similar Messages

  • Exporting using exp and TRIGGERS=N doesn't  work

    Exporting using exp on version Export: Release 8.1.6.0.0 - with the option TRIGGERS=N stills exports with triggers. is it a bug ?
    Any sugesttions ?

    This is actually a known behaviour.
    As of table level export, all the dependent objects are exported and is expected namely, indexes, constraints, triggers... and even restricting with other parameters set to n will not disable their export.
    As of schema level export, the whole schema is exported and with this we can pose our restrictions like no constraints, no rows, no indexes, no triggers etc.. which will work because we have control.
    For table level export we dont have control on individual objects. 10g solves your problem.

  • Use of transactional triggers in Forms 4.5.

    Hi All,
    Can any body help me in using transactional triggers?
    It 'll be best if anybody send me a text version (.fmt) of
    ttrig.fmb**, which is a demo provided by Oracle, with D2K
    release 1.x. This form 'll solve my purpose, since it
    demonstrates all the functionality of transactional
    triggers.
    Help 'll be greatly appreciated.
    Regards,
    Vimal Kaushik
    null

    Mr. Duncan Mills and other Oracle experts,
    I am currently working on an upgrade of numerous SQL*Forms version 2.3 to 6i.
    I have a few questions:
    Is there a detailed checklist to follow for the migration from SQL*Forms 2.x to 6i?
    Do you have any examples that show the proper syntax to follow for this conversion?
    Some of our colleagues have stated that a migration from SQL*Forms version 2.3 to 3.0 is required?
    Just to verify, if migrating from SQL*Forms v.2.3 to 6i - I need to first migrate the SQL*Forms v.2.3 .inp file to
    version 4.5 using the F45GEN program of Developer 2000, this will generate a version 4.5 .fmb file which I then need to
    migrate to 6i using the IF60CMP program of Developer6i
    Please let me know if there are any additional undocumented steps that I need to follow.
    Does anyone have an electronic copy of the Duncan Mills presentation 'Migrating Character Mode Applications
    to the Web '? If so, Can you email me a copy?
    Thank you, in advance, for your assistance.

  • Can I have 2 Muse Composition widgets using the same triggers?

    I have a page with 2 compositions. One fades in some images and the other rolls in some text from off the screen. Each has 3 triggers. I want them to be linked by the same trigger. At the minute, to see the image with the corresponding text I have to select the trigger for each one. Its quite annoying. Is there an easy fix for this that I am missing something obvious?
    Thanks in advance for your help

    Hi
    We cannot use same trigger for different targets as they would overlap each other and only the one on top will be active.
    By looking at the purpose , I would suggest you to insert image and text in same container so that rollover action should show up the image and text at same time.
    Thanks,
    Sanjit

  • How can 10 TFN's be used for 80+ triggers in uccx ?

    I have a set of 10 TFN's and i cant make for any more TFN, but ihave 80 +  applicatons for which i have per trigger per application.

    Let's make this a simple problem by stating that we only have 1 TFN and 2 Applications/Triggers.  How can we leverage our 1 TFN to server to triggers?
    Option 1:  TFN allocation percentages.  You can configure your TFN in the service provider cloud to allocate each DID/DNIS 50%/50%.
    Option 2:  TFN points to the first Trigger, and it asks the caller to make a selection or stay on the line.  If they make a selection you perform a Call Redirect in the script to the other Trigger.  E.g., Press 8 to speak to a Sales associate, otherwise stay on the line for self service.
    Option 3:  Create a thrid Trigger to proxy incoming calls, and force the caller to make a selection, leveraging the Call Redirect step in the script to steer the calls to the proper Triggers.  E.g., For Sales Pharmacy, press 1, for medical records, press 2, etc.
    If you just increase the number of TFN's and Triggers, then the solutions stay the same, but you have to figure out which option works best for any given scenario.  You may find that a mix of these options are needed to solve the business case at hand.
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • Use of Oracle Triggers as Deltamechanism for Custom Tables

    Hi Colleagues,
    we have a 50 million records Y-Table in SAP ECC 6.0 with Oracle 10.2.0.2.0.
    The Y-Table have no update, timestamp or numeric pointer fields for using the SAP generic delta feature.
    So we will use the Oracle trigger feature: CREATE TRIGGER <trigger_name> FOR <table_name> to get the Y-table keys of inserted, updated or deleted records.
    Are there any side effects or warnings for this?
    Thanks and regards,
    Wolfgang

    Hi,
    my Ora-Trigger-Solution works well on R/3 development system.
    On quality assurance system it dumps with ORA-04098.
    It looks like, that required object privileges have been never granted.
    Do someone know, what priviliges or authorisations have to be maintained and where to maintain this?
    Thanks and regards,
    Wolfgang

  • Using iCal event triggers to launch application

    We've been trying to use iCal to autolaunch render clients for Cinema 4D. So we've set it up to trigger at the time of the event (6pm) and launch the C4D network render client. What is bizarre is that it works perfectly for about a week.... and then it stops launching the app at the event. We still get iCal alerts on our iPhones saying that the 6pm Render Client is launching. But it ceases to launch. If we delete the event (and future events) and recreate it... it works again for about a week. Then it goes back to the same problem of not launching. This issue exists on all our machines (dozen or so) and has been an issue in both 10.9.x and 10.10.x. We weren't using this method prior to Mavericks. It appears to be a bug in iCal. Anyone else seen this and possibly have a workaround?

    Maybe the following can help: http://www.javaworld.com/javaworld/javatips/jw-javatip127.html?

  • How to use DML in triggers?

    Hi Everyone,
    I have converted a report from Oracle Reports to BI Publisher. It has shifted the trigger code in DB and made the Trigger entries in DATA Template. When Return FALSE from Trigger it gives error other wise report runs cleanly. Which show trigger is executed.
    But when I put some DML command like Insert or update it does not give any error during execution but no row is inserted or updated.
    I am in trouble need help immediately.
    Iqbal

    Thanks for your help. I had commit in my triggers but for test I created a new test report and defined one beforeReport and one group filter triggers. Group filter is working but trigger does not. Here is the code for triggers:
    CREATE OR REPLACE PACKAGE BODY newtest AS
    function BeforeReport return boolean is
    begin
    IF p_deptid=10 THEN
         p_whereclause:='AND Departments.department_id=10';
    ELSIF p_deptid=20 THEN
         p_whereclause:='AND Departments.department_id=20';
    ELSIF p_deptid=30 THEN
         p_whereclause:='AND Departments.department_id=30';
    ELSIF p_deptid=50 THEN
         p_whereclause:='AND Departments.department_id=50';
    ELSIF p_deptid=40 THEN
         p_whereclause:='AND Departments.department_id=40';
    ELSE
         p_whereclause:=null;
    END IF;
    return (TRUE);
    end;
    function g_department_idgroupfilter(department_id in number) return boolean is
    begin
    IF department_id=40 THEN
         return (FALSE);
    ELSE
         return (TRUE);
    END IF;
    end;
    Functions to refer Oracle report placeholders
    END newtest ;
    I have defined parameters in package specifications and in template with same name and data type. Its very simple but I dont know why its not firing. Can you tell me technical reason.

  • Problem using TAPI triggers and merge statement

    Hi,
    I use Designer tapi triggers on a table. When I try to execute a merge statement, I get the following error:
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value.
    Is there a restriction when using TAPI triggers and merge statements that anyone is aware of?

    No restrictions on MERGE commands that I know of. I have, however, seen the TAPI give inexplicable ORA-06502 errors. It would help to know what line in which procedure or trigger gave the error. That information should have been in the error stack.

  • How to use and configure DAQmx software triggering in Labview 7.0

    Dear NI support staff,
    I want use to software triggers to start and stop acquiring an indefinite amount of analog samples (as opposed to a fixed number of N samples in most of your code examples). I don't know the correct way to configure the DAQmx property nodes and the DAQmx send software trigger VIs. In the property node VI it doesn't seem to have an entry for software trigger. So I think I am not on the right track. Would you please help me out? It would be great if you can show me an example. Thanks a lot!
    Regards,
    Bennett

    Hello Bennett,
    The example below demonstrates how to perform an analog software triggered acquisition in NI-DAQmx. The example allows the user to specify the triggering condition and the number of pre-trigger samples to acquire.
    Example Code - Triggering
    Let me know if you have further questions.
    Good luck and have a great day!
    Regards,
    Koninika
    Applications Engineer
    National Instruments

  • Sql Tuning using OEM and Logon triggers

    OEM = 10.2.0.4/Agent 10.2.0.4
    Target = 10.2.0.3 Db
    We have several db users that have session level adjustments made by use of logon triggers. When OEM is used to review one of those session's performance and sql tuning opportunities - are the logon triggers and the session level settings taken into consideration? Another way to ask is if the suggested changes from the sql profiler are making decisions based on the user's session level settings?
    Thank you in advance.
    -abe

    Your logon triggers affect the new sessions. When you monitor with OEM, it is no affect on OEM's activity. Hoping that, your logon trigger did not affect the user which OEM uses to connect to repository DB.

  • Triggering a camera using LabView

    Hey,
    I have a device that I'm moving using two servos. I'm controlling the motion using LabView. I want to capture the images of the device using MotionPro X3 high-speed camera (To track the position etc). So I need to synchronize the camera trigger and the motion using LabView. The software that comes with the camera (Motion Pro Studio) has the ability to allow the camera to be triggered using an external source. So I generated an analog signal using labview, and I connected a BNC cable from the analog output on the DAQ board to the camera. The camera needs at least 3V so it gets triggered, so I created a point-slider in labview, to increase the voltage from 0V to at least 3V.  I got this part to work.
    So now I'm trying to combine the camera control code with the motion control code. In the motion control VI, when I hit "Run" the device starts to move, but data (Position, forces etc) is only saved when I hit "Save Data". What I want to do is to trigger the camera when I hit "Save Data", and not when I run the program. Is there a way to increase the voltage from 0 to 3V when I hit the "Save Data" switch?
    Thanks in advance. I appreciate it if you could help me as soon as possible. This is driving me crazy.

    Hi FirasOSU
    If possible, please post what kind of software you have available to work with and the specific hardware. The information I am posting is assuming you are working with one of our data acquisition boards which work with our NI-DAQmx driver.
    There are several ways you can trigger the camera from a DAQ board depending on the model. I would recommend that you refer to the following knowledge base/white paper regarding tips and techniques for triggering with a data acquisition board and NI-DAQmx VIs
    http://www.ni.com/white-paper/4329/en/
    Here you will find information regarding options for triggering with our data acquisition boards using LabVIEW and sample code you can use to add triggering functionality to your code.
    Also depending on your camera ports and if you have access to our vision tools that can be added to LabVIEW (Vision Development Module), then you can use the following example code to trigger your camera acquisition.
    https://decibel.ni.com/content/docs/DOC-9112
    Best of luck with your project!
    Luis S
    Application Engineer
    National Instruments

  • Straw poll: use of triggers to enforce data format rules.

    For a while now I have used before insert triggers to enforce data formatting rules, such as applying UPPER to certain fields. This is a habit I picked up in the mists of time, and never really thought about before...
    ...until just now, when a colleague questioned the wisdom of this practice, in language too colourful for a family forum like this. So the question is: is this good practice or not?
    In the particularly case in point, I could have used (and may yet implement) a foreign key to a reference code table, which would enforce uppercaseness as a side effect. Alternatively I could have used a CHECK CONSTRAINT, but the potential values are too fluid for that.
    I am interested in your opinion on the general principle: is it right for the database to enforce formatting without the user being aware of the change?
    Thanks in advance.
    Cheers, APC

    Andrew:
    In principle, I would not disagree with enforcing formatting in the database, as long as that formatting is required to satisfy a business requirement (e.g. one of our departments has a business rule that all medications must be stored in upper case, dosage information and frequency must be all lower case).
    In your case in point, I would absolutely enforce upper case in the database if you are going to enforce a foreign key. If the code value is stored upper case in the code table, then a trigger to UPPER(code) in the child table is appropriate since an end-user would likely be confused by a constraint violation between 'ABC' and 'abc'. Even if you are not going to enforce the FK, I would assume that you will join to the parent with some frequency, so having both in the same format makes the joins a lot easier.
    My argument against a check constraint to enforce upper case would be based on the (hypothetical, but realistic) user thought process of:
    "Damm application keeps making me re-type everything, so I'm just going to put the caps lock key on AND SHOUT AT THE DATABASE".
    Having said that, if you are just enforcing upper case to get case insensitive searches, then function based indexes get around that problem without forcing formatting.
    My $0.02 CDN (about a ha'penny)
    John
    P.S. You may want to get a better class of colleague.

  • Can I use the 2 digital triggers on the PCI-6023E to trigger 2 seperate Analog inputs on the same board?

    I want to monitor 2 analog DC signals (single point measurements, not a waveform) and I want to use the digital triggers to start the acquisition, 1 trigger for 1 AI. the measurements need to be made at 1Hz, maybe slower. Is this possible with the PCI-6023E?
    If not what hardware should I be looking at? I have a total of 6 triggers and 6 AI.

    Dimentia,
    I would need confirmation on what you want to do:
    1) I want to monitor 2 analog DC signals
    This means that you will have one Analog Input operation monitoring two channels. Please confirm.
    2) single point measurements, not a waveform
    Ok, no buffers.
    3) I want to use the digital triggers to start the acquisition, 1 trigger for 1 AI
    This would mean that a single digital pulse or edge on a single line would start your 2-channel analog input operation. Please confirm.
    4) the measurements need to be made at 1Hz, maybe slower.
    Hardware-timed or software-timed? 1 Hz could be easily implemented with software timing. But the triggering could force you to use hardware timing. It will not be a problem but it would be good to know.
    5) Is
    this possible with the PCI-6023E?
    Everything I mention above is possible with the PCI-6023E.
    6) I have a total of 6 triggers and 6 AI.
    This last phrase is what really confuses me and seems to contradict the previous sentences. Does this mean that you will want to perform 6 independent Analog Input operations, with its own triggers (one each)? Will every Analog Input operation have 2 channels?
    I'll clarify why this is important:
    - Each Analog Input operation can only have one hardware digital start trigger assigned to it.
    - Only one Analog Input operation (multiple channels allowed) can be performed per board at any time.
    Since the rates are so slow I would recommend that you perform sample all channels within a continuous acquisition and then discard the data that does not meet a certain condition. You could sample the triggers as well and discard those channels for which the trigger has not been received.
    These are just some ideas based on my assumptions on the
    problem. Assumptions are never a good thing so please confirm on the point s above and we'll try to help.
    Thanks
    Alejandro Asenjo
    Applications Engineering
    National Instruments

  • What are useful tools for users with sensory issues?

    I have multiple sensory issues, and bright lights, flashing lights, loud noises, high-pitched noises, etc. can be very painful and sometimes incapacitating for me. I worry backup beepers will get me killed.
    A lot of websites *including this support website* use flashing animation, noise, etc., triggered automatically, using autoplay, or triggered by trying to scroll past.
    I have separate tools to disable autoplay, to disable animated gifs, etc. I can't understand why (a) Firefox enables these misfeatures and (b) Firefox doesn't include one built-in tool to disable these.

    I have sensory issues involving bright lights, flashing lights, loud noises, high-pitched noises, proprioception, and some other stuff. I don't have colorblindness.
    I also have a fix to use bigger font sizes to reduce eyestrain. I tried using zoom, but too many websites broke with zoom, it kept reverting, etc. If nosquint does zoom better than the default, nosquint might help with that.
    But... I still have sensory issues involving bright lights, flashing lights, loud noises, high-pitched noises, and a lot of other stuff everywhere and online, and I still need fixes ...and I also need people to stop beating me to the ground, but that's beyond Firefox.

Maybe you are looking for