How to make form do update instead of insert?

I want to use the same data block in a form to do both
inserts and updates. How can you manually tell the data block to do an update?
The reason I want to do it manually is, I populate the block manually using a function when I want the user to
do a data update.
It seems like the data block is in insert mode by default. Is that true or do I have something else incorrect?
Thanks,
Tim

Sounds like you are going out of your way to make this difficult for yourself.
If I am understanding you correctly, the simplest way to achieve your goal is as follows:
1. Create a block based on your table using the wizard including your ID columns as base-table fields.
2. Manually add as many fields as necessary for your non-base table code/dscription fields (make sure the database item property is set to NO).
3. Create a POST-QUERY trigger on your block. This trigger fires each time a record is retrieved from the database. So you can code a simple cursor to populate the non-base table fields.
4. Your LOV needs to be written in such a way that it populates both the visible code/description fields and also the hidden ID fields. This will make sure that forms marks the record for update.
5. The LOV needs to be associated with the field that the user will be typing values into (ie. the code field).
If performance is an issue, you could also consider basing the block on a key-preserved view which will allow updates. However, I would consider the post-query approach first before getting too advanced.

Similar Messages

  • How to make form fields "Clickable"

    Hey Guys,
    I created a Fillable PDF Form with Form fields using ADOBE Acrobat 9.0 Pro-Ex + LiveCycle Designer for Windows XP.
    My question is when you create a form, is there a way to make form fields "clickable" instead of just auto-tab? Because if you mess up when filling out the form, you don't want to have to tab through the whole document just to get back to that spot. How can i fix that?
    My other question is, when printing the form, the form field "text boxes" always show up. Is there a way to hide the boxes and just print the form without them. (The information that was filled in will still show, just the outline of the boxes won't?)
    Thanks a bunch,
    Joseph

    Unfortunately I don't know enough about Designer to tell you what you did to make the boxes unclickable, but for me I've never had an issue doing that.
    However, I can tell you what you need to do to get rid of the boxes around each of your text fields.
    1. In design mode, select the field(s) you wish to get rid of the borders on. (If all you have are text fields, you can press Ctrl+A to select all fields. If not, you can hold down the Ctrl button while left-clicking each field to change all text fields at once.)
    2. Open the Object window (Shift+F7 toggles this on and off). Find the option for Appearance.
    3. Click the drop down menu next to Appearance and choose none.
    4. The borders will now be gone from the text fields.

  • How to make Form builder 10g step into libraries *.pll while remote debug

    How to make Form builder 10g step into libraries *.pll while remote debug. It attaches fine and goes through code located in form but skips pll's. In this case I am interested in debuging CUSTOM.pll. How to step into pll's and is it possible at all?

    Is the library in the same directory or within your FORMS_PATH? Note that the runtime setting in the default.env doesn't work for the builder.
    cheers

  • How to make form based authenticaiton in adf security?

    Hi all
    How to make form based authenticaiton in adf security?
    help give example video or project.
    Thanks lhagva

    Have you read the docs (http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/adding_security.htm)?
    Timo

  • Form function security (how to make form Updatable)

    Hi...friends...
    I have one standard oracle form. Data of that form is updatable in 11.5.7 instances...I can insert,update and delete.
    But, we had upgraded Apps to 11.5.10...so, now the same form data is not updatable..I can insert, but cant delete or update...
    So, is there any thing like form function security attached with that form or responsibilities in previous version... which are not in new 11.5.10 ??
    How can I make that form contents updatable through Sys. Admin. concept.
    (not through Form Builder Design)
    Thanks in advance....

    Thank you guys..
    actually, it was a bug with 11.5.7 oracle versions specific to one check box value.
    it was treating check box values as,
    i) checked then 'Y
    ii) Null then 'Null' ------- the problem was here...due to null, query was not fetching data and that form is having flag which understands only 'Y' or 'N'
    iii) not checked then 'N'
    anyway thanks to u all...

  • Can 3 vertical Radio Buttons span 3 rows in a table? AND how to make form highlight when radio butto

    I am trying to add 3 grouped vertical radio buttons where one is on each line of a 3 row table. When I group the 3 buttons it squeezes them into one row, is there a way I can have them grouped and one in each.
    Also, I would like to know how to make part of the form highlight when one of the 3 buttons is selected

    Hi,
    If I am not wrong, a table cell can hold only one component or none. In order to place the radio group to different positions vertically, you can use subforms instead of table.
    Asiye

  • How to make lightroom 5 default instead of old version 3

    How do you make LIGHTROOM 5 default instead of old version 3?

    denone42 wrote:
    If I have a photo on my desktop and I click on it -I get option to
    open in Lightroom.
    I've heard of this, but never experienced it. For the post part, Lr opens catalogs not photos - dunno if being registered to open photos was a little mistake or on purpose..
    One thing I do know, there was a time when opening a photo with Lightroom would sometimes result in the inability to open Lightroom ever again (without some "hacking"), because it tried to open the photo as a catalog, which made it very confused and unhappy.
    My guess is: Adobe no longer supports opening photos with Lightroom (and so Lightroom 5 did not register itself to do that when installed, and so you have an old and now obsolete association), even if at one point it did - but I could be wrong.
    Sorry I can't be more help - maybe somebody else will be able to offer more insight and/or a solution.
    UPDATE: One thing that might help (if you can't get Lr to open photos how you want) - open catalog instead, then drag those photos into Lr library grid.
    Good luck,
    Rob

  • How to make form register in adobe edge?

    hy, how to make coding form register in adobe edge? please help me

    hy, master uboss..
    could i ask again?
    i was tried it as your suggestion but after i fill it data still cant send to database..
    could you give some suggestion longer?
    file connection.php
    <?php
    $host = "localhost";
    $user = "root";
    $password = "";
    $database = "register";
    mysql_connect($host,$user,$password) or die ("database tidak terhubung, cek koneksi");
    mysql_select_db($database);
    ?>
    file proses.php
    <?php
    include "koneksi.php";
    $password=$_POST['password'];
    $username=$_POST['username'];
    $email=$_POST['email'];
    $fullname=$_POST['fullname'];
    $query=mysql_query("insert into daftar(password, username, email, fullname)
    value('$password','$username','$email','$fullname')");
    if($query){
    echo "Data Berhasil ditambah";
    ?><a href="/bukutamu.php">  Lihat Data Masuk</a><?php
    }else{
    echo "Gagal input data";
    echo mysql_error();
    ?>
    file login.php
    <!DOCTYPE html>
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
      <title>Senza nome</title>
    <!--Adobe Edge Runtime-->
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <script type="text/javascript" charset="utf-8" src="login_edgePreload.js"></script>
        <style>
            .edgeLoad-EDGE-1488021 { visibility:hidden; }
        </style>
    <!--Adobe Edge Runtime End-->
    </head>
    <form action="proses.php" method="POST">
    <body style="margin:0;padding:0;">
      <div id="Stage" class="EDGE-1488021">
      </div>
    </form>
    </body>
    </html>
    after submit
         database---->>> stil blank...

  • How to make Activity Monitor update faster

    Hello,
    I have a mcabook pro early 2012. How do I make activity monitor update faster? It is currently updating every 4 - 5 seconds. thanks
    -24

    You should get the 4 speed model. 
    Ciao.

  • How to do update instead of insert / cancel the insert

    Hello,
    we are porting an application, written originally for PostgreSQL, to Oracle. Most of the porting is pretty straightforward - change column types, simple trigger syntax changes etc.
    But we have a table (more precisely several tables) with a set of triggers, holding a tree-like structure. The point is in PostgreSQL we're using a RETURN NULL; behavior in BEFORE triggers, which means 'do nothing' to simplify thing.
    For example imagine tables A and B - and in a trigger on B we could have something like
    INSERT INTO A VALUES (id, ...)
    without a check on a uniqueness of the id value. And in a BEFORE INSERT trigger on A we have something like
    SELECT INTO c id FROM A where id = NEW.id;
    IF FOUND THEN
    UPDATE A SET .... WHERE id = NEW.id;
    -- cancel the insert without an exception
    RETURN NULL;
    END IF;
    which checks for existence of the row, and if it already exists it effectively replaces with UPDATE and cancels the INSERT without an exception.
    Is there something like this in Oracle or do I have to completely rewrite / refactor the whole thing?
    PS: We do have UNIQUE (more precisely PRIMARY KEY) on the columns - I am aware that this is not sufficient to enforce uniqueness in Oracle.

    There are a couple of ways that this could be accomplished in Oracle, although the though of an insert into table b also inserting or updating rows in table a makes me cringe. The easiest way only requires a trigger on table b.
    Something along the lines of:
    SQL> CREATE TABLE a (ID NUMBER PRIMARY KEY, descr VARCHAR2(10));
    Table created.
    SQL> CREATE TABLE b (id NUMBER, descr VARCHAR2(10), descr2 VARCHAR2(20));
    Table created.
    SQL> CREATE TRIGGER b_bi
      2     BEFORE INSERT ON b
      3     FOR EACH ROW
      4  BEGIN
      5     INSERT INTO a VALUES (:new.id, :new.descr);
      6  EXCEPTION
      7     WHEN DUP_VAL_ON_INDEX THEN
      8        UPDATE a SET descr = :new.descr
      9        WHERE id = :new.id;
    10  END;
    11  /
    Trigger created.
    SQL> INSERT INTO a VALUES(1, 'One');
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> INSERT INTO b VALUES(1, 'NewOne', 'New One');
    1 row created.
    SQL> SELECT * FROM a;
            ID DESCR
             1 NewOne
    SQL> INSERT INTO b VALUES(2, 'Two', 'Old Two');
    1 row created.
    SQL> SELECT * FROM a;
            ID DESCR
             1 NewOne
             2 Two
    SQL> COMMIT;
    Commit complete.If you really require the trigger on table a for other reasons, then you could do something like:
    SQL> RENAME a to a_table;
    Table renamed.
    SQL> CREATE VIEW a AS SELECT * FROM a_table;
    View created.
    SQL> CREATE TRIGGER a_ii
      2     INSTEAD OF INSERT ON a
      3     FOR EACH ROW
      4  BEGIN
      5     INSERT INTO a_table VALUES(:new.id, :new.descr);
      6  EXCEPTION
      7     WHEN DUP_VAL_ON_INDEX THEN
      8        UPDATE a_table SET descr = :new.descr
      9        WHERE id = :new.id;
    10  END;
    11  /
    Trigger created.
    SQL> CREATE OR REPLACE TRIGGER b_bi
      2     BEFORE INSERT ON b
      3     FOR EACH ROW
      4  BEGIN
      5     INSERT INTO a VALUES (:new.id, :new.descr);
      6  END;
      7  /
    Trigger created.
    SQL> INSERT INTO b VALUES(2, 'NewTwo', 'New Two');
    1 row created.
    SQL> SELECT * FROM a;
            ID DESCR
             1 NewOne
             2 NewTwo
    SQL> INSERT INTO b VALUES(3, 'Three','Third');
    1 row created.
    SQL> SELECT * FROM a;
            ID DESCR
             1 NewOne
             2 NewTwo
             3 ThreeNeither should require any changes to your application code. However, once agan, I think it is a really bad idea for triggers to have side efects on other tables.
    John

  • How can i perform an update instead of a Delete?

    I have to migrate an MS SQL 2005 database to an ORACLE 9i database. In MS SQL we use “INSTEAD OF DELETE” triggers on tables to prevent record deletion. Instead of a delete we perform an update. Changing the application code is not an option.
    According to the ORACLE documentation instead of triggers can only be applied to views.
    I tried using a simple BEFORE DELETE trigger to raise an application error to prevent the deletion, but the application cannot handle the exception raised. And even if the application could handle the raised exception. I would still have to perform a update.
    Question: What is the equivalent for an instead of delete trigger on a table in ORACLE 9i? (Specific do an update instead of delete) Any examples?
    Message was edited by:
    user640306

    Question: What is the equivalent for an instead of
    delete trigger on a table in ORACLE 9i? There isn't.
    Changing the application code is not an option. Ahhhh I like these questions. I need to drive BMW instead of Opel but every switch has to be in the same place. Or I need to put Opel headlights into Ferrari, why I cannot do that?
    Even if you could they would look ugly and most probably won't work. The first requirement for porting apps into different DBMS is to understand the fact - they are different just like cars. They are produced by different vendors just like cars.
    Gints Plivna
    http://www.gplivna.eu

  • How to make form buttons do what they say?

    I created a test form on a sqlquery and the HTMLDB created the items and buttons correctly. Afterwards I created a process on load before heade to retrieve a row from the DB if some items are populated.
    What I wanted to know is:
    1-How do I make the buttons do the thing they say?
    2-Can someone explain what is the purpose, and how I use them, of the Database Manipulation Request that I can select in the button definition.
    Thanks,
    Eduardo
    PS: There is anything more complete that the online documentation?

    Reise,
    To see how things are supposed to work, create a report + form using the wizard on a single table with a primary key. Once completed, you'll run the report, click on an edit icon which takes you to a form, prepopulated with the data from the corresponding row. Because the primary key item has been set, the update button is shown and when you click update, and update will happen. Likewise, when you click delete, the row will be deleted. I think the problems you're having may be related to the fact that you're building a form on a SQL Query, which is quite rare and may require special tweaks.
    Sergio

  • How to make form a single long page; remove page breaks?

    Hi. I am pretty new to liveCycle but really like it so far! I think these forums are great too. I did a few forums searches and couldn't find a specific answer to this question, so I began this discussion. Please forgive my ignorance if this is has been discussed before!
    I am trying to make a form that isn't intended to be printed. I would like to make it a single long page instead of having page breaks in it. I have experimented with custom page sizes and way able to make the pages longer, but there is a limit to how long liveCycle allows me to make the pages... like 27" or something. I'd like to have no page breaks at all.
    I am not very familliar with XML, but do have some HTML experience, so I could copy/paste some code to the XML sheet if need be-- provided I was told where to put it.
    I attached a bit of the form I would like to turn into a single page to this discussion.
    Any help at all would be greatly appreciated! Thank you very much!

    In teh hierarchy view - click on the Master Page/ Page1. Now on the object palette on the Master Page Tab you can choose a Paper Type. If you scroll to the bottom of the list you can choose a Custom size. The width and height dimensions are now available to you. The UI in designer limits you to 59 in. If you need more than that there is a way to get bigger but you have to do it in the native XML format. Let me know if you need more than that. Here is a modified sample.
    Paul

  • How to make form read only

    hello
    is it possible, and if so how, to set a form to read only. i will have 2 oracle responsibilitys. 1 group will enter the data and save it . the other will only be able to view the form as read only.
    any ideas is helpful
    thanks
    james

    This can done using SPEL , Make a VO with transient attribute with boolean Type.
    For one responsibilty set this attribute value to true where you want readOnly behaviour.
    code should be like that
    OAViewObjectImpl pVO = YourPVO();
    OAViewRowImpl pVORow = (OAViewRowImpl)pVO.first();
    If(Check for responsibilty)
    pVORow.setAttribute("IsEditMode", Boolean.TRUE);
    On page level set spel for disable/Readonly property for item for them you need show as readonly
    like
    ${oa.YourPVO.IsEditMode}
    Hope it will help you.
    Thanks

  • How to make form field read only for users with certain permissions

    We need to make two form fields read only for users with certain permissions. Kindly guide me on how to do this in Infopath. I searched and there is an option to disable to the column, but no option to select user permissions. 
    Please give your suggestion on this. 
    thanks.

    Hi,
    See the link below:
    http://info.akgroup.com/blog-0/bid/69277/InfoPath-Restrict-visibility-to-users-in-a-SharePoint-Group
    Here you can add the fomatting action on the field to disable the field if those users belong to certain Sharepoint group (does not matter the permission levels though). Hope it helps.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

Maybe you are looking for

  • Can't run KDE with OpenGL using radeon driver

    Hi, I'm running KDE on a ThinkPad T400 with an ATI Radeon HD3470 card using the radeon driver. I've got the desktop running with desktop effects using XRender, but when I try switching to OpenGL I get a pop-up saying... "Failed to activate desktop ef

  • Error message when trying to download from Mac App Store

    When I try to download an app in the Mac App Store I get an error message:  "We could not complete your purchase.  Error Unknown."  Sometimes it says: "There is an error in the Mac App Store".  This has been going on for a couple of days now.  I have

  • Oracle 10g to SQL Server

    Hi All, We have established a connection between ORacle and SQL Server, When I query in TOAD. It works fine e.g. this statement works fine in TOAD: select * from JDETAIL@ex_test But when I try to execute the following statement from PL/SQL BLOCK. It

  • Item category REN, TAN combine in one SO

    Dear Expert, Can I input different items such as REN, TAN and others in one SO? Can I use Returnable material for big value material? regards Gang

  • Trigger Firing Sequence?

    Hei Guys I have a form where I have a date and time field(text fields). I have a OK/SAVE button, which is subclassed, and executes do_key(commit_form), which in turn executes form level key-commit trigger. On the key-commit trigger, I have some progr