Assign an lov dynamically to a text item

On a form, I have created static lovs LOV2,LOV3. I have text items t1 and t2. Depending on the value of t1, I would like to assign either lov2 or lov3 to t2. Is this possible? I would really appreciate any help. Regards,Suma.

Hi Mr.Kubicek,
Thank you so much for the quick response. Appreciate it so much. Only one dilemma, is that at this particular point of transaction I am still in the middle of capturing the user's data input and am not completed with the record. How would it affect the page submission? Also, I was wondering if there is a posssibility to use Javascript to avoid multiple page submissions. Iam new to using APEX, so please pardon my ignorance.

Similar Messages

  • Query LOV and how to display the LOV back in the Text item.

    Hi All,
    I have got a big time problem in getting back my LOV value after Querying it.
    Am using a Tabular Canvas having 10 rows and two columns, one having "Type"(as LOV) and corresponding "Type identifier".
    My LOV is an non data block item, having the correct return type. When ever i search for a value in the LOV, its should give out all the "Type Identifier" list and the "Type".
    But what i am facing is, am not able to get back the selected LOV after querying it and am getting the entire "Type Identifier' with out any filter.
    In short my requirement is,
    - I need to search an LOV,
    - Display the LOV value in the "TYPE" field.
    - Display the corresponding "Type Identifiers'
    Pls note: Since am new to Oracle Forms, if in your replies, if you specify to use any code in trigger, pls specify which trigger to use.
    Thanks a lot in Advance... its bit urgent
    Arun

    Hi Dave
    The requirement is suppose i have an Lov called OrgName is atatched to a column in which user will select the Ou Name from the list and internally the respective org_id will store into the database where the OU Name is available in the same data block but it is not database item . (Only org_id is database item)
    Now if you query the same block i would expect the Ou Name should display .
    Right now in my case it is not displaying anything into that column.
    Hope u understood this time..Please let me know is there any trick?

  • Assigning a LOV to a text item

    Hi all
    I have a text item
    i want to conditionally attach an LOV to a text item
    How can i do it ?
    Thanks

    Hi
    Thanks for your response
    I have created a program unit and called the program unit at when new form instance trigger
    following is the code in my program unit
         it_id := Find_Item('data_blk_DATA.ATTRIBUTE50');
         Set_Item_Property(it_id,VISIBLE ,PROPERTY_TRUE);
    Set_Item_Property(it_id,POSITION ,data_tab(data_ctr).x_axis,data_tab(data_ctr).y_axis);
    begin
         select att_query
         into v_query
         from data_query
         where OBJECT_TYPE = :HRM_ADDITIONAL_ATTdata_label.object_type
         and attribute_name = :data_label.ATTRIBUTE50;
         rg_id := Find_Group(rg_name);
         IF Id_Null(rg_id) THEN
              rg_id := Create_Group(rg_name);
              gc_id := Add_Group_Column(rg_id, 'SALESREP',CHAR_COLUMN);
         END IF;
         errcode := Populate_Group_With_Query( rg_id,V_QUERY);
         SET_LOV_PROPERTY('LOV_ATT50',rg_name,rg_id);
         Set_Item_Property(it_id,LOV_NAME,'LOV_ATT50');
         exception
              when others then
              v_query:=null;
         end;
    I have a table data_query in which i have stored the query as a string in the attr_query column of the table
    eg
    select * from data_query
    would give me
    object_type attribute_name att_query
    test attribute50 select col1 from q_dummy
    I have created a LOV:-lov_att50
    which i am trying to dynamically attach to the text item
    But when i run the form
    i cannot see the LOV attached to the text item with the query from the table
    Please help me
    Thanks
    Edited by: abcdxyz on Sep 20, 2010 10:33 AM

  • Creating Dynamic Text Item

    Hi
    I am creating an application which needs dynamic creation of text item.
    ie., after POST-TEXT-ITEM I want to creat another text box beneath the existing text item.
    Is there any possibilities that we can create the text item by Code.
    Thanks in advance
    Vijendra

    Hi ,
    Take a look at the following:
    Building a dynamic block at run-time
    Regards,
    Simon

  • b Track Text Item Change /b

    Hi all,
    I'm using Forms 6i.
    I want to track the changes in a Text item.
    I want to uncheck one check box, when the user changing the value of the particular text item. There are two ways to change the value of the text item.
         1. The user can directly enter the value.
         2. They can select the value from LOV associated with that text      item. Sometimes they will not select the value from LOV simply cancel it also.
    Which trigger shall i use.
    I cannot use Validation & navigational triggers. since the cursor may or may not going to that particular text item and also the navigational(Both Mouse & keyboard) property is no.
    Thanks in Advance.
    Aravind

    Hello,
    I cannot use Validation & navigational triggers. since the cursor may or may not going to that particular text item and also the navigational(Both Mouse & keyboard) property is no.
    So, how the end user can change the value if the focus is not in this particular item ?
    Francois

  • Assigning LOV return Value to multiple text items

    Hi all
    I have a custom form on which i have 10 text items
    text item 1,text item 2 ....text item10
    I have a table xx_querywith fields
    text_item,query
    i have inserted into the xx_query table
    insert into xx_query(text_item,query)
    values(text_item1,'select sysdate from dual');
    insert into xx_query(text_item,query)
    values(text_item2,'select sysdate-1 from dual');
    I have created a record group dynamically and i am getting the query from the query column of the xx_query table into the record group(say test_rg)
    I have created a LOV test_lov and thr set_lov_property i have populated the test_rg query into the test_LOV
    is it possible for me to set the return item of the LOV dynamically so that i can get the LOV on the item which i want to ?
    thanks
    _

    Hi All
    thanks for your responses
    I have Created a control item and assigned the return value of the LOV to the control item
    and i have assigned the LOV to the text item that i want
    Currently when i navigate to the text item the LOV is visible
    but when i select a value from the LOV the value is not getting populated into the text item
    I have assigned the value of the control item to the text item
    but i am not sure in which trigger to write the code so as when i select the value from the LOV the value should be shown on the form populating in the text item
    Thanks

  • How i can assign multiple values to tabuler text item (Help)

    HI
    IM PROGRAMMING ONE FORM AND I PUT THERE TABULER TEXT ITEM
    I WANT ASSIGN 63 VALUES TO THIS TEXT ITEM ONE BY ONE BY CODE I MEAN PUT FIRST VALUE IN THE FIRST TEXT ITEM ROW THEN SECOND TO THE SECOND TEXT ITEM AND LIKE THIS UNTIL I REACH TO THE LAST
    I MAKE LOV PUT I CAN ASSIGN ONE VALUE BY ONE VALUE EACH TIME DOUBLE CLICK ON THE TEXT ITEM ASSIGN ONE VALUE THEN DOUBLE CLICK ON THE SECOND ROW PUT MY BOSS WANT ASSIGN ALL VALUES 63 FROM ONE CLICK ON BUTTON

    Then you will have to create a when-validate-item trigger with a cursor based on your selection of your LOV . Loop through that cursor assigning the next in the next record by using the built-in function next_record. (put you selection for you value in a hidden item for example.
    something like this:
    Declare
    cursor c is
    select returnValueFromLOV
    from <yourtable>
    where yourdisplay value = :hidden_tem;
    begin
    for r in c loop
    next_record;
    item := r. returnValueFromLOV;
    end loop;
    exception
    when no_data_found
    your error handling;
    end;
    Hope it put you on the road to reach what you want
    Erwin

  • Dynamically create and remove TEXT items in forms

    Hi Guys,
    Is there a way to dynamically create and remove TEXT items in form. For example I have the EMP and DEPT table and when
    I select the EMP table name from the LOV, rows of the EMP table with column name and data should get displayed on the screen and likewise a similar action for DEPT table and
    so on. I have about 90 tables from where data could be required to view and edit. They all have varying number of columns.
    Any suggestions ?
    Thanks
    KMD
    null

    Use OLE concept of developer and map Excel as an object
    Nadeem
    null

  • How to enter the data into data block text item which has an LOV associated

    Hi,
    I have a data block, one of the data block text item has an LOV assigned. when I populate this text item using the LOV and do "execute_query", it is taking the value in the text item and adding it to the search criteria, but when I enter a value manually in that text item and do "execute_query" it is showing me an alert(which I created) "Please enter a value".
    My question is, why is not taking the value that I enter manually? Looks like before executing the query, this field is getting empty
    How to avoid this problem and make sure that the value entered in the text item is added in the where clause of the query?
    Any advice?
    Thanks in advance
    R.G

    Problem solved!
    Before doing execute-query, all the text items are being cleared,so I used a global variable to store that value
    Thanks anyway
    R.G

  • Text items not being refreshed by LOV items.

    Hi all,
    I've got a strange LOV behavior problems which I cannot solve and require your valuable time and efforts.
    I've created a simple ADF JSF pages with 3 fields and the first field is LOV enabled. For all new row, after clicking the LOV icon, the LOV will show up and after selecting a particular value, it closes the LOV screen and replace it with a new row with the selected LOV data. It is all working well for all new rows just like a normal LOV should perform.
    But I had problem with existing data. The row which I selected from the LOV somehow cannot referesh and overwrite any existing row (visually) but after commiting the data, it was actually written and refreshed with the correct data. Is there a property in the JHeadstart Application Definition Editor where I enforce the text items to be refreshed by the LOV items?
    Thank you for your time and efforts.
    Kind Regards,
    John

    Hi Guys,
    I've performed the following scenarios attempting to refreshed Text items by the LOV Items.
    Scenario 1: Create a new column called some_key load unique number into it. Set this column as the primay key and deselect existing primary keys as key attributes. Also, I've created a sequence and some_key is of type of DBSequence getting value from the new sequence starting from 1.
    After generation when run and the result is:
    JBO-27022: Failed to load value at index 11 with java object of type oracle.jbo.domain.DBSequence due to java.sql.SQLException.
    ## Detail 0 ##java.sql.SQLException: Invalid column index
    Scenario 2: Create a unique index for the some_key column, rerun and the result is:
    JBO-27022: Failed to load value at index 11 with java object of type oracle.jbo.domain.DBSequence due to java.sql.SQLException.
    ## Detail 0 ##java.sql.SQLException: Invalid column index
    Scenario 3: Set some_key as number instead of DBSequence (from Entity Object Editor), rerun and the result is:
    JBO-27021: Failed to load CustomDatum value at index 11 with java object of type oracle.jbo.domain.Number due to java.sql.SQLException.
    ## Detail 0 ##java.sql.SQLException: Invalid column index
    Scenario 4: Deattach the offending View Object from the Application Module. Remove the offending view link and view object. Recreate view object and view link. Reset some_key is of type of DBSequence getting value from the new sequence starting from 1 (From the Entity Object Editor). After generation when run and result is:
    SUCCESSFULLY!!
    So, I guess the bottom line is here are the following things which you need to perform in order to enable text item to be refreshed by LOV item (if the detail table has composite primary keys)
    1.) Create a new column
    2.) Load unique value to it
    3.) Create unique index for it
    4.) Create entity object, view object and view link object.
    5.) Set the new column as primary key.
    6.) Deselect the key attributes for all composite primary key columns.
    Regards,
    John

  • How to make one of the columns in my tabular an text item with popup lov

    Hello,
    I want to manually make one of the columns say for the deptno in my tabular form as on text item popup lov using apex_item package
    and whenever user clicks on the text item popup lov, it should open up an dept table report and from which he/she needs to select
    the deptno and this deptno should be returned into the text item popup lov column.
    like for example: say if i have an emp table tabular form with all the columns and deptno column as an popup lov and when user clicks on this column
    it should open up an new sql report(similar to popup lov window), the select statement for this would be
    select deptno,dname,loc from dept order by 1;
    And from this popup lov report whenever an user selects a particular deptno, the same deptno should be returned to my text item popup column in emp tabular form.
    something like this
    select
    "EMPNO",
    "EMPNO" EMPNO_DISPLAY,
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    APEX_ITEM.TEXT(3,deptno,20,50,'readonly=true') || '<img height="16" align="middle" width="16" style="vertical-align: middle;" alt="Popup Lov" src="/i/lov_16x16.gif"/>' deptno
    from "#OWNER#"."EMP"
    like i made my column as an text item lov and now I want to write an onclick event for the text item lov so that an popup window is displayed which is a sql report of the table dept (select deptno,dname,loc from dept order by 1;) and in this report i want to make deptno as an link so that when ever an user clicks on it
    -- this value should be returned to my text item popup lov column deptno in the emp tabular form.
    can anyone help me out with this issue.
    thanks,

    Hi,
    Refer to the link for the detailed information on ALV Grid.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Hope it helps.
    Regards,
    Rajesh Kumar
    Edited by: Rajesh Kumar on May 25, 2009 9:13 AM

  • I want to read the contents of a file to a text item line by line dynamical

    I have created a timer
    tm_id := FIND_TIMER('LOG_READING_TIMER');
    If Id_Null(tm_id)
    then
    tm_id := create_timer('LOG_READING_TIMER', 1000, REPEAT);
    else
    set_timer (tm_id, 1000, REPEAT);
    end if;
    /* executed the shell script on application server */
    host(v_command,no_screen);
    and used below code for reading a file in when timer expired
    DECLARE
    v_file_name := '/home/log.txt' /* log created during running shell script */
    BEGIN
    v_infile := Text_IO.Fopen(v_file_name , 'r');
    loop
    Text_IO.Get_Line(v_infile,v_linebuf);
    :CONTROL.item:= :CONTROL.item||v_linebuf||chr(10);
    end loop;           
    WHEN no_data_found THEN
         Text_IO.Fclose(v_infile);
         delete_timer('LOG_TIMER');
    END
    I want to read a log file which is created while runnning shell script line by line
    dynamically
    Above code is reading the log filebut all the lines are shown at once.
    I have to display
    each line on the text item
    and the next line line by line
    Can anyone help me how to achieve this.
    Thanks,
    in advance

    In when-button-pressed trigger
    I have called a shell script on application server using host command
    HOST('Path of script',NO_SCREEN);
    Shell script writes some set of statements to log file on application server
    Problem is to read the log file on to the multiline text item each line simultaneosly
    while running the script.
    Below is the procedure i have written to achieve this but below code is writing all the lines at once
    after entire complete execution of shell script.
    for example
    shell script writes tolog file:
    1. 'Loading of tables';
    then loads the data
    2. 'emailing data';
    3. ...
    4. ...
    Below code writes
    all the 4 lines at once
    I want to see in frontend what is going on while running the script
    by reading the log file data line by line
    WHEN-BUTTON-PRESSED
    tm_id := FIND_TIMER('LOG_READING_TIMER');
    If Id_Null(tm_id)
    then
    tm_id := create_timer('LOG_READING_TIMER', 1000, REPEAT);
    else
    set_timer (tm_id, 1000, REPEAT);
    end if;
    /* executed the shell script on application server */
    host(v_command,no_screen);
    WHEN-TIMER-EXPIRED
    and used below code for reading a file in when timer expired
    DECLARE
    v_file_name := '/home/log.txt' /* log created during running shell script */
    BEGIN
    v_infile := Text_IO.Fopen(v_file_name , 'r');
    loop
    Text_IO.Get_Line(v_infile,v_linebuf);
    :CONTROL.item:= :CONTROL.item||v_linebuf||chr(10);
    end loop;
    WHEN no_data_found THEN
    Text_IO.Fclose(v_infile);
    delete_timer('LOG_TIMER');
    END
    While running the script on application server
    I want to see the data from log file simulataneously on to the form when the data is written on to the log file
    Please let me know if you need more details.
    Thanks,
    in advance

  • How to check old and new value for a text item attached to a lov?

    Hi,
    I am new to Forms.
    I need your help in following.
    I have a form which has a text item which is attached to a LOV. I want to track what changes are being done using that form. So i want to know what was old value and what is new value.
    I can get the new value as it is there in form field. how can i know what was the old value.
    Thanks
    Prashant Pathak

    This is wrong:
    name_in(':' ||l_audit_block.field_name)
    this is right and will get you the current value of the the item:
    name_in('l_audit_block.field_name');
    Assuming the name of you block is "l_audit_block" and the name of your item is "field_name".
    Please note name_in() returns your current value for an item. In your case this may or may not be the "old" value. I define "old" value as the value it was when it was queried. If that is what you are looking for you need to use the get_item_property() call that Steve described above.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Oracle 10g FRM-41051 on a non-database text item with a LOV

    Hi all,
    I'm struggling with a problem I'm convinced must have a really simple solution, but for the life of me I can't figure it out!
    I have a data block called query. It is a non-DB block with a number of items, with either LOVs or drop down lists. It is used to choose values, which are them programatically 'translated' into values in two other database data blocks (which are populated in the WHEN-BUTTON-PRESSED trigger of a button in the non-DB block).
    This is necessary as I have a slightly complex query which takes values from many different tables and displays bits of information from all the different tables.
    My problem is that, on my text item (which has a LOV attached to it with Automatic Display set to Yes); when I click on it, I expect the LOV to show and I am able to choose a value from it. Instead I get the error 'FRM-41051 You cannot create records here' and the LOV does not display.
    I don't understand this. Everything on the block is a non-DB item, including the block itself, and I don't want to 'create' any records, all I want to do is choose values into my text items which I can then use in a DB query (written in my trigger).
    What am I doing wrong?
    Abigail

    Probably this other item or block has got property insert allowed to FALSE.
    I have suggested you to use a push button in order to check that everything in the LOV is OK.
    Lov can also return value to item in another block; probably in your case there is something that fires the error.
    Normally when I develop my form I disable on-error and on-message trigger in order to follow every step at runtime...
    I'm happy that you have resolved your problem :D
    Fabrizio

  • Dynamically generating text item in developer

    Hi,
    I am developing applicationn in developer 6i and I am facing problem regarding
    displaying records in form. My query is
    select ename, edept from sale where city = 'NYK'
    suppose this query fetch 10 records and I dispalyed them in developer but problem is that I donot
    want to display scroll bar in form and only 10 text items to display 10 record.
    some times my query fetch 15 record and I have opted to display 10 record and unchecked the
    scroll bar in FORMs designing it displays 10 records and 5 records where shown when i use
    key board to go down and then I can see them.
    kindly tell me whether I can use some commands to generate text items
    dynamically depending upon my records.
    If I have ten record then only 10 text items will be displayed and if 15
    then only 15 text items.
    Thanks

    Hi,
    You cannot create items at run time.
    You could create the items at design time in a control block and programatically show or hide them based on a query to retrieve the details you need.
    I would ask why you want to do this. Enable the scrollbar, let the users scroll up and down and you get all the functionality for free. No need to create a control block, populate it, control the number of displayed items, considerations on canvas size when number displayed would overflow canvas.
    Oracle spends billions of dollars developing software so you don't have to go through the pain.
    If you cannot simply do something in forms, then question the requirement, not try to re-engineer Forms
    Neil

Maybe you are looking for

  • Java Generics in Ejbs WebLogic 9.2 MP1 WindowsXP Sun JDK

    Hi guys, I tried to deploy our application on Weblogic Server 9.2 MP1 (Windows, Sun JDK) and during deployment I have this error see bellow. Can somebody tell me what is the problem with generics and EJB compiler? Is necessary to add any path or chan

  • Display problem w/Mozilla

    Hello! I can't get Firefox (any versions including Nightly and Aurora) to display properly on my HP Omni220. It installs fine, but when I open the program there's a brownish veil over the start page or only half  of start page is displayed. Firefox w

  • How to display a Report 9i from Forms if the Report has a Parameter Form?

    Hi, could some one please post me a code sample to show how to call a (paper layout, RDF) Report from Forms if I would like it to display the Report's parameter form first? Thank you in advance. Tamas Szecsy I used the following code segment do achie

  • Jar file is empty

    Hi, I am trying to package a small application into a jar file, but besides the manifest, the jar comes out empty. My directory structure is a s follows /mydir/src/ [java files and manifest.txt] /mydir/bin/[compiled java classes in packages] I run th

  • Error calling a package function

    Hi all, I've created one package and inside it, I've two different functions. The package definition and body are OK. Now, I want use it but, I've an error: ORA-06550: line 16, column 13: PLS-00201: 'BB.PKG_BB_TEMP' must be declared this is the funct