How to insert values using pushputtons in text item & fetch data based on

Dear friends,
I want to insert values in the Text item using pushbutton e.g to insert 05CST884 into text item using pushbuttons '0' '5' 'C' 'S' 'T' '8' '8' '4' (alpha numeric buttons) in the layout editor and then fetch data based on the number entered with that of one in the table in the another text item2 in the layout editor.
Suggestions regarding how to develop and use effective triggers are welcome.

At the block level (for the control block where all your push buttons are, let's call it block1) create a WHEN-BUTTON-PRESSED trigger. Your [A-Z] and [0-9] buttons should be on a dedicated non-database datablock to reduce problems. As stated previously, this trigger should just contain the code:
:block2.text_item := :block2.text_item||get_item_property(:system.trigger_item, label);
Also on the pushbutton block, create a backspacve button with its own dedicated WHEN-BUTTON-PRESSED trigger containing:
if length(:block2.text_item) > 0 then :block2.text_item := substr(:block2.text_item, 1, length(:block2.text_item)); end if;
This will hopefully erase the last character entered.
block2 should be based on the database table (see Property Palette --> Database) you wish to query and text_item should be based on the database item which contains the code you entered. All the other database items you wish to displayshould also be added to block2.
Add another FIND push button to block1 with the code:
go_block('block2');
execute_query;
Without writing the whole thing for you, I'd suggest you get a decent Forms tutorial book to guide you through the basics (Oracle Forms Developers Handbook).

Similar Messages

  • Inserting values using merge

    Hi everyone,
    I need help with inserting values using merge.
    * I need to check all the units in a parent category. For example, NF_ARTICLECATEGORYID = 7462 is a parent category.
    * Im going to compare all the units in the parent category(7642) to the units in a subcategory (8053).
    * If the units in parent category(7642) is not present in the subcategory(8053) then the units will be inserted in the same table.
    table structure:
    Table name : ARTICLECATEGORYACCESS
    Fields: IP_ARTICLECATEGORYACCESSID
    NF_ARTICLECATEGORYID
    NF_UNITID
    NF_USERID
    N_VIEW
    N_EDIT
    Sample data:
    CREATE TABLE articlecategoryaccess (
    IP_ARTICLECATEGORYACCESSID NUMBER(5),
    NF_ARTICLECATEGORYID NUMBER (10),
    NF_UNITID NUMBER (10),
    NF_USERID NUMBER (10)
    N_VIEW INT,
    N_EDIT INT);
    INSERT INTO articlecategoryaccess VALUES (255583, 7642, 29727, NULL, 1 ,1);
    INSERT INTO articlecategoryaccess VALUES (243977,7642,29728, NULL, 1 ,1);
    INSERT INTO articlecategoryaccess VALUES (240770,7642,29843, NULL, 1 ,1);
    INSERT INTO articlecategoryaccess VALUES (243413,7642,29844, NULL, 1 ,1);
    INSERT INTO articlecategoryaccess VALUES (274828,7642,44849, NULL, 1 ,1);
    INSERT INTO articlecategoryaccess VALUES (274828,8053,44849, NULL, 1 ,1);
    Units ID 29727, 29728, 29843, 29844, 44849 has access to parent category 7642.
    The units id 29727, 29728, 29843, 29844 dont have access to subcategory 8053.
    29727, 29728, 29843, 29844 should be inserted in the same table and will have an access to 8053.
    After they are inserted, it should look like this
    IP_ARTICLECATEGORYACCESSID     NF_ARTICLECATEGORYID     NF_UNITID NF_USERID N_VIEW N_EDIT
    255583     7642     29727 null 1 1
    243977     7642     29728 null 1 1
    240770     7642     29843 null 1 1
    243413     7642     29844 null 1 1
    274828     7642     44849 null 1 1
    new value     8053     44849 null 1 1
    new value     8053     29843 null 1 1
    new value     8053     29844 null 1 1
    new value     8053     29728 null 1 1
    new value     8053     29727 null 1 1
    NOTE: IP_ARTICLECATEGORYACCESSID is a sequence and it should be unique
    DECLARE
    BEGIN
    MERGE INTO articlecategoryaccess b
    USING (SELECT *
    FROM articlecategoryaccess c
    WHERE nf_articlecategoryid = 7642
    MINUS
    SELECT *
    FROM articlecategoryaccess c
    WHERE nf_articlecategoryid = 8053) e
    ON (1 = 2)
    WHEN NOT MATCHED THEN
    INSERT (b.ip_articlecategoryaccessid, b.nf_articlecategoryid, b.nf_unitid, b.NF_USERID, b.N_VIEW, b.N_EDIT)
    VALUES (articlecategoryaccessid_seq.nextval, 8053, e.nf_unitid, null, 1, 1);
    END;
    i got an error after running the script:
    *Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
    For Trusted Oracle configured in DBMS MAC mode, you may see
    this message if a duplicate entry exists at a different level.
    *Action:   Either remove the unique restriction or do not insert the key.
    why would it be duplicated? its a sequence and its unique.. I dont know, maybe there is something wrong my script..
    Any help is appreciated..
    Ed

    Ed,
    1. What is the current value of the Sequence? Does the current value of sequence exist in the table? If yes, then increment the sequence to a value that is not present in the Table.
    2. Do you have any unique constraint on any of the columns that you are inserting?
    I have to ask you again, Why are you insisting on Merge statement when a simple Insert can do the job for you? Don't you feel that the below specified Merge statement is making things look more Complicated than they actually are, do you?
    Think on it and then proceed. I hope these pointers help you to resolve the issue.
    Regards,
    P.

  • Please could someone tell me how to insert colour into my calendar text, especially coloured Highlights. Thanks.

    please could someone tell me how to insert colour into my calendar text, especially coloured Highlights. Thanks.

    Another netbook is not a desktop computer.
    Have you transferred your iTunes library from the backup for the laptop that died along with all other important data to the new computer such as documents, photos, etc.?
    If not, all iTunes content on your iPhone will be erased as the first step when syncing the iPhone with iTunes on a new or different computer.
    Have you launched iTunes on the new computer?
    Is you iPhone avaialble under Devices in the iTunes source list on the new computer?

  • How do you write UNDO for a text item?? examples? or a REDO??

    How do you write UNDO for a text item?? examples? or a REDO??
    I created a pop-up menu with CUT, COPY, PASTE, UNDO, CLEAR for my text items.
    Using MAGIC menu type works great but there is no MAGIC for UNDO or REDO.....
    How do you write UNDO for a text item?? examples? or a REDO??
    I have Oracle Forms 6i...
    Lets say I highlight all the text in the text item, and start typing over it... then I realize OH NO it is the wrong text field...
    Now I want to UNDO the typing and get back to the previous text.
    I'd use the initial value that was populate right? How do I access that if that is correct?
    Thanks, Bill

    You can use;
    <ITEM> := Get_Item_Property(<ITEM>,DATABASE_VALUE);
    Or you will have to write a pre-text-item trigger;
    PRE-TEXT-ITEM:
    :CTRL.CURRENT_VAL := :<BLOCK>.<ITEM>
    MENU (PL/SQL):
    :<BLOCK>.<ITEM> := :CTRL.CURRENT_VAL;
    You may also want to set the item property back to ITEM_IS_VALID so that item validation does not fire again.

  • Multiple select queries used in Excel BI report ,fetching data from Sharepoint DB(SP2010_Prod_ProjectServer) causing blockage on DB ,when more than one workbook(same copy of Excel BI Report) refreshed using Refresh All option.

    I am using mutiple select queries to fetch data from Project Server 2010 DB(its sharepoint DB) and these queries fetch data in Excel BI report by establishing connection with DB using instance name and all. I have enhance all these select queries and data
    is being fetched in secs. but when more than one copy of same Excel BI report is refreshed using 'Refresh All' option, then these select queries cause blockage on DB.
    Please let me know mitigation for this blockage issue.
    Should I use begin transaction and commit transaction statements/ shared lock statements.
    please reply

    Hi,
    run same query at the same time?

  • How to insert values in table using ADF Task flow? I am not able to bind CreateInsert on my first page fragement

    Hi,
    In Jdeveloper 12c I am trying to create a task flow where I have taken 3 pages to insert values in a table. On first page when I put data control of 2 columns as input with label, then on bindings tab I created an action as CreateInsert.
    Now when I am trying to create invoke action in executables then this option is not available.
    How can I create this task flow where values can be inserted in the table on the 3rd page fragment on commit button???
    All 3 pages have data control input boxes to insert values in the table.

    Hi,
    Right click on the task flow page activity, click create page def and add there. If your activity is a page, then you can select the page and generate the pagedef as well.
    Then you can add the executables.
    Thanks.

  • How to insert values from different region into one table

    Hi everyone
    I have created a page which contains 4 html regions like region1,region 2 ...region 4
    in region 1 i created 2 text items like (emp_name,emp_id).
    in region 2 i created 2 date fields (start_date,end_date).
    In region3 i created a tabular form which contains(job , hire_date).
    in region 4 i created a textfield (%of Hike)
    So i want to create a button(submit) .when i press the button it will insert all the informations provided by the user in different regions will be inserted to a table called employee_information.
    Can i do this?
    If it is possible please tell me how to do this
    if not then tell me any alternative solution.
    Thanks,
    Regards,
    Sabyasachi

    Sabyasachi wrote:
    Hi fac586
    Can you please tell me step by step how to do it or can you please make an example in apex.oracle.com and give me the credentials so that i can know clarify my doubts.1. Create a Form using a Wizard. This will create the items and processes necessary to retrieve data from, and perform DML on, the table. The items will be contained in a single default region.
    2. Create custom HTML regions on page.
    3. Move items and buttons from the default region created by the Form Wizard by changing the Region value in the "Displayed" section of the item attributes page, or Page Items page; or reassign items to regions using the Reassign Region Items page.

  • How to insert new line in a text file

    hi all,
    i wnat to know how can i insert a new line in a text file using java.
    for example i want the formate of the text like this
    1 2 3
    4 5 6
    until now i know only how to insert data but not new line.
    Thanks in advandce

    Hi you can put a new line in a text file using System.getProperty("line.separator"). This implementation will work for every OS.
    import java.io.*;
    class Demo{
    public static void main(String args[]) throws Exception {
    FileWriter fr = new FileWriter("FileDemo.txt");
         fr.write("AAAAAAAAAA");
    fr.write(System.getProperty("line.separator"));
    fr.write("AAAAAAAAAAA");
    fr.close();
    }

  • How to insert  value in  UserDefine MasterData  table ?

    dear  all ,
            I have added a userdefine table ABC and   columns (Code,Name,DocEntry,Object,U_Code,U_Name).
             I  want to insert value in ABC table .i can't understand  how to assign 'DocEntry'  column value
    i am using
               SAPbobsCOM.UserTables      oUserTabItems = (SAPbobsCOM.UserTables)oCompany.UserTables;
               SAPbobsCOM.UserTable      oUserTabItem = (SAPbobsCOM.UserTable)oUserTabItems.Item("WITM");
               oUserTabItem .Code = SimpleProdEntity.sku;
              oUserTabItem.Name = "1ffd";
                   oUserTabItem.DocEntry =1; not work
                   oUserTabItem.UserFields.Fields.Item("DocEntry ").Value =1;  not work
                  how to assign 'DocEntry'  column  value 
              oUserTabItem.UserFields.Fields.Item("U_Code").Value = "ffhj dfsdf";
                        oUserTabItem.Add();
    plz help........

    Hi
    You have to register your UDO first. Then you can use this code for inserting values
    Dim oCompany As SAPbobsCOM.Company = B1Connections.diCompany
                Dim oGeneralService As SAPbobsCOM.GeneralService
                Dim oGeneralData As SAPbobsCOM.GeneralData
                Dim oGeneralParams As SAPbobsCOM.GeneralDataParams
                Dim oCmpSrv As SAPbobsCOM.CompanyService
                oCmpSrv = oCompany.GetCompanyService
                oGeneralService = oCmpSrv.GetGeneralService("UDO") ' UDO unique id
                oGeneralParams = oGeneralService.GetDataInterface(GeneralServiceDataInterfaces.gsGeneralDataParams)
                oGeneralData = oGeneralService.GetDataInterface(GeneralServiceDataInterfaces.gsGeneralData)
                oGeneralData.SetProperty("Code", "1")
                oGeneralData.SetProperty("Name", "1")
                oGeneralData.SetProperty("U_Code", "code")
                oGeneralData.SetProperty("U_Name", "Name")
                oGeneralParams = oGeneralService.Add(oGeneralData)
    Regards
    Arun

  • How get Inserted value Id in MySql ?.

    Hi,
        How to Get Inserted value Id in MYSQL.
    I am using " select LAST_INSERT_ID() " But its not working Properly.Can u provide any other  solution For this.Please Help me.
    Thanks &  Regards
    Madhava Reddy.

    How to Get Inserted value Id in MYSQL.
    Hello,
    This is a forum for Transact-SQL = Microsooft SQL Server, not for MySQL; you should post your question to a more related forum.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to insert  values to msexcel sheet via jsp

    currently I am using jsp ,and I am supposed to use ms excel sheet as a referal database, the problem is I tried to insert values to excel sheet but its running well but the datas r not written in excel sheel I tried the following aspwects also
    <%@ page language="java"%> <%@ page contentType="application/vnd.ms-excel" %> <% response.setHeader("Content-Type","application/vnd.ms-excel");%> <% response.setContentType("application/vnd.ms-excel");%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    but it is still a problem of not able to write in excel sheet

    JSPs do one thing well - generate HTML. There aren't intended as general purpose transaction handlers and they certainly don't know how to generate XLS files.
    To generate an XLS file try the POI package, which you'll find links to from www.sourceforge.org.
    To generate one in a web server environment use a servlet, and call the POI classes from that.

  • How to insert a table in JTextPane("text/html")....

    How to insert a table in JTextPane(with contentType(text/html))....like we insert bold/italics etc..AND when I retrieve the contents using getText(),I should be able to get the html tags for table.........!!!
    Anyone Anywhere with solution..???

    -------

  • How to insert values in the standard table

    Hi Experts,
      I have a Standard table ( Info structure ), its called S551. It having 20 fields, Now i want to insert some 1000 records inthat table from Excel sheet, can any one plz help this.
      If i tried in se11, with create entries option its not allowing to insert the values manually inthat table.
    Plz help this. Point will be sure.
    Mohana

    Hi Mohana,
    U can't insert the records directly in to the standard data base table. Also it is not advisable. It is always better to use BAPI/BDC to upload mass data.
    I advise to write a small program for this.
    Upload the excell file to internal table which is having same structure of S551.
    use FMs TEXT_CONVERT_XLS_TO_SAP or GUI_UPLOAD for uploading data from excell to internal table.
    INSERT/MODIFY S551 FROM itab.
    Make sure that ur excell file structure and internal table structure matches and
    U have values for all the primary keys of the table and don't have duplicates(primary key).
    Thanks,
    Vinod.

  • How to filter values using presentation varible if it is using a multiselec

    Hi Gurus,
    Could you pls suggest me here.
    I have a requirement like my OBIEE 10G version report is not filtering the values when we select any value in Dashboard prompt.
    I tried to create a presentation varible in prompt for filtering but for prompt under control it is given an MULTI SELECT.
    i need to filter the values .now though we select any value in prompt ,it is not picking any value.
    How to filter the values using MULTI SELECT Here.Please suggest me here .
    Regards,
    SK

    Hi User,
    In, the physical layer go that column and change datatype from double to int and save the rpd.
    This should resolve your issue.
    Even, it is not required to modify or use cast function to change datatype.
    Else,
    Change the datatype of column in the Business layer.
    This should resolve your issue.
    Assign some points if this helps you :)

  • How to Insert Character using Prepared statement

    Hi All,
    Can anyone let me know how can I insert character using prepared statement.
    Thanks
    Sameer

    In the future JDBC related questions should be posted into the JDBC forum.
    Can you please provide some more information about what you are trying to do? It isn't clear to me. Are you trying to update a CHAR field?

Maybe you are looking for

  • HT1212 Im trying to put my ipod in recovery mode because it is disabled.  Nothing seems to happen when the ipod comes back on.

    Im trying to fix my son's ipod.  It is disabled.  Ive been trying the recovery method that is described but nothing happens.  Im not sure what to do next.

  • Problem with  printer resources

    hello .. how can i use printer resources in to my application       PrinterJob printJob = PrinterJob.getPrinterJob();by using above code i am accessing printer job. prinetr resources displaying correctly,but when i move it , my background frame is no

  • I have a question about incomplete music downloads.

    Hello, I have an older iPod touch (3rd generation) running iOS 5.1.1. I've had it and enjoyed it for a few years. Sometimes, when I buy music off of the iTunes app on the device, they won't download and show up in the Music app with a little stop sig

  • Tuning VPD predicate

    Hi, I'm using VPD(RLS) to filter data based. I have a performance issue due to the VPD predicate my VPD function generate. I have two tables: - MARKER which is the table I want to secure and contains a primary key named marker_id and a filed use by V

  • Non-compatible message problem

    im having a problem with the non-compatible message, keep getting it with nothing attached to it and since that i cant hear music with the speaker , i cant even hear the keyboard clicks or YouTube video sound, volume is all the way up, speaker does w