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

Similar Messages

  • 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

  • How i assign chinese font to a text item

    Hi,
    I have a chinese font and i want assign that in a text box.
    how i do that??
    plez kindely help me out..

    Is the chinese font installed in your system? If yes, then it'd come in the drop down menu under the font property of the text box item.

  • 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 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

  • 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.

  • 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

  • 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

  • Validating list item with text item havin LOV, how  2 do?

    Dear Sir’s,
    I have two items,
    a) emp_id which is a TEXT ITEM having a LOV
    b) dept_name which is a LIST ITEM.
    Suppose, those employee id’s having 100 and 101, when selected from the LOV, the dept_name list item should automatically become IT_DEPT and the user should not be able to change the value in the list item and the cursor should not be navigable. Like wise, when employee id is 102, the dept_name should show, some of the specific name from the list and not navigable.
    For this, what should I do? Please help me.
    Mitto.

    First in the LOV query select the department name. In the LOV properties, in column mapping properties make the field width as 0 so that it will not be visible in the LOV. In the return item field browse for the item and select it.
    In the run time, upon clicking the lov, the value will be populated automatically.
    I hope this helps.
    Regards,
    Anantha Narayanan
    http://askanantha.googlepages.com

  • Text item mapped against more than one LOVs for returning value

    hi to all,
    is it possible to have two LOVs (LOV1 & LOV2) that return value to a same text item (:LOV_VAL )on a form.
    i.e.
    on selecting LOV1 row, value is returned to :LOV_VAL item.
    On selecting LOV2 row, value is returned to :LOV_VAL item.
    on the basis of valued retured to :LOV_VAL the data block is queried.
    If yes how , if now please provide me alternative way.
    Thanks in advance.
    plz do it fast.

    Hello,
    Why don't you try ?
    You can define a return item for each column of each LOV.
    If you want, you could have one hundred LOVs that return the same column in the same item.
    Francois

  • Unable to return value from LOV to the text field

    I have created the LOV and attached in the database text item. I have done the mapping to the require field in the LOV properties and I was able to show the LOV whenever reach that field by press F9 with all the records in my query. However, when I try to press enter to select one of the data in the LOV screen, the data was not return to the column which I have defined the LOV. What's wrong with this ?
    Regards,
    Lim

    Lim,
    Check is there any KEY-LIST-VAL trigger has any code. And Also check by assigning the same value to a dummy item for testing.
    Regards,
    Manu.

  • Multiple values from database on a single text item

    i am trying to do the following
    on a single text item in a form
    (under form property pallete->records->number of items displayed is 5) run a triger "when-new-block-instance" with the following pl/sql statement
    declare
    menu_item VARCHAR2(35);
    begin
    select label into menu_item
    from menu_options;
    end;
    however, once i run the form it gives me
    WHEN-NEW-BLOCK-INSTANCE trigger raised unhandeled exception ORA-01422
    however, if in the pl/sql statement contains only
    begin
    execute querry;
    end;
    then it works fine
    The problem i beleive is the fact that the first querry retreives multiple values or recordset instead of A record.
    How can i go arond this and allow the form to list all the values in this form. Eventually i will need to add conditional SQL statments and that is why just execute querry will not work.
    Also, is there a way to dynamically assign a number to "number of records shown" property?
    All help is very much appreciated!
    null

    Hi, Marko
    I teach Forms, and I usually find a bad idea to use SQL statements directly (in particular when you can "make" Forms to do what you want).
    Inside PL/SQL, a SELECT..INTO statement is supposed to select a single row, otherwise an error occurs.
    EXECUTE_QUERY works.
    If by "conditional SQL statements" you mean restricted (filtered) queries, you don't need to write SQL to do this.
    You can set the DEFAULT_WHERE block property to a different value before using EXECUTE_QUERY, like:
    SET_BLOCK_PROPERTY('your_block', DEFAULT_WHERE, 'where menu_id > 100');
    And the answer to your second question is no, you cannot dynamically change the number of records a block is displaying.
    You can limit the number of records your block queries from the database table using Maximum Records Fetched block property (available in Forms 6 and above, not sure about Forms 5). However, this will only work as expected if you set Query All Records to Yes.
    Hope this helps,
    Pedro

  • Chart and text items are not synchron

    hi all,
    i am a newbie in apex 4.0.
    i have two regions. the first shows a chart, based on pl/sql-code. second shows text items for possible filter an the current statement of the chart.
    when user clicks on a bar in the chart then
    1. i set the the first text item as filter,
    2. a pl/sql-code runs, build a sql statement, assign the sql statement string to the second text item and
    3. returns the statement for the chart.
    it works fine. the chart refresh. and the data i can see are correct.
    but the text items in the other region doesn't refresh.
    when i press "refresh"-button at browser level everything is fine. chart and text items fits together.
    what can I do to refresh all regions when the chart changes the sql-statment / User clicks?
    Is there any way to read out the current statement of a chart?
    thx in advance
    jogi
    Edited by: Jogi on 09.05.2011 12:31

    Bernd: the reason I asked about views is that you don't have any error messages. This might indicate that (a) you have no items in the view, or (b) there's something wrong with view-role-user assignment.
    To check for (a), please go to the published procurement catalog, and go to Views tab. Check that your View is Active. Click on your View ID link to display view details. You should see a list of characteristics assigned to your view in Assign Characteristics sub-tab (the list should not be blank!). Go to Assign Items sub-tab. Navigate in your schema to find items that are supposed to be assigned to your view. You should see "Yes" in the "Assigned" column for those products. If you don't, then you simply don't have any items in your view.
    Another thing I'd like you to check: when the user calls your procurement catalog for search, do you see the name of the catalog displayed just below the drop-down "Select Categories Hierarchically"?
    Cheers,
    Serguei

Maybe you are looking for

  • Error while creating Group

    Hi All, We have a typical scenario. In our application we have a form 'Cust_fmb' which will give count of records for customer. We are populating the customers group using following query. rg := create_group_from_query('custgrp','           select cu

  • Color change from Photoshop to Keynote

    I have corrected the color of some images in Photoshop CS2 using a color calibrated monitor, converted the images to JPEG and imported them into Keynote. It was disappoining and unexpected to see a significant shift in color with a greenish-yellow ti

  • Officejet pro 8500a control panel display is all white. Any fixes? Can it be repaired?

    Control panel display is white.  Can't see any of the functions.  I know there has been alot of problems with this printer.  Has anyone gotten this display panel repaired or replaced?  Any help would be very appreciated thanks!!!

  • Random App Crashes? Is this iOS 6.0.1 issues?

    I have an iPod touch 5g and am on iOS 6.0.1 . I sometimes experience built in apps like Camera and the App Store crash for no reason :( Does any else have random apps that keep crashing ? I also restart and reset but the problem later comes back. It

  • Flash Date and Oracle date

    Is it possible to convert a date being retrieved from an oracle database to the flash Date format in flash so that the different Actionscript date functions can be applied to the retrieved date.