Select query based LOV for tabular form attributes

Hi HTMLDB Team,
Congrats u all for the new release of HTMLDB in htmldb.oracle.com.
I badly need a solution of the below problem.
Say , i have table called user_col_comments now i want to display the table_name ,column_name and comments in a tabular form.I displayed only one row for the tabular form.Now i create a select query based LOV for attribute table_name where i got all table_name in drop down list.
Point is that after selecting any data from drop down table list i want to get the corresponding fields to be populated in column_name attributes.How can i wrote the select query based LOV for the attibute column_name.
I wrote it as 'select column_name d,column_name r from user_col_comments where table_name=:TABLE_NAME Its not working?
Similarly i want same thing to display for comments after matching both table_name and column_name.
Any solution to get rid of those problem will be highly appreciable...
If u need my htmldb.oracle.com userid and password to solve the problem i will sure let u email it.
Cheers,
Eman

hi rchalton,
can u plz little bit more clearer .I know hopefully u can imagine the problem and may u guide me thru proper way.....One think i understand that there must be multiple process and submit but "only when..." that u have said i cant understand that part........
U are welcome to give me proper solution.....
Thanks for the reply ....atleast one can pay hid to me.....
Cheers,
Eman

Similar Messages

  • Cascading select list (query based) in a tabular form

    Hi,
    In my application i have two select list in a tabular form one for selecting manager_id and other for selecting employees for the selected manager_id how can i do it in apex 4.0
    thanks in advance

    Ok i will assume that you have 2 select list items called (P1_MANAGER AND P1_EMPLOYEE)
    In employee select list u need to find Cascading LOV Parent Item(s) and set it to P1_MANAGER. Ofc your sql query must be smth like this:
    SELECT employee_name d, employee_id r FROM employee_table WHERE employee_manager = :P1_MANAGER

  • Dynamic LOV FOR TABULAR FORM 6i

    Hi,
    I have tabular form of two Items(ID,DESC) and I want to Populate LOV for item(ID) every record
    and record_Group & SQL statments are stored in DB.
    ACTION: when query in POST-QUERY Trigger get for every record in tabular form -- the stored SQL-Statment from table then put it into dynamic record_group and populate the dynamic LOV.
    Please advice,
    Thanks in Advance.

    OK daniel
    This form used for get reports
    then header get the name of Report (Table-A) (report_ID),(report_desc).
    then details for get the Parameters will send to report builder (Table-B) (detail_id),(report_id),(sql_stm).
    so parameters may be need for example stock code so this record need to query from stocks table to get stock code and stock name.
    next record for item Code so need to query from Items table to get the Item code and Item name
    another report for employees so the user enter report code then when query and get in details block employee code and employee name.
    so the lov will check if this record have query sql-statment or not if have execute it in the record_group then in lov
    then go to the next record if sql_stm is null then no lov in this record and so on.
    thanks..

  • Tabular form (select list Query based LOV)

    Hi all,
    I have this situation:
    a tabular form with two "select list (query based LOV)" fields.
    The first one must affect elements in the second one. And so the second query based LOV field should has a "where attr1 = first_list_selected_value" in the query.
    Is this possible ? Could you show me some advices ?
    thanks in advance.

    OK, thank you.
    But maybe I wasn't too clear.
    I need cascading LOV for each row of my tabular form.
    I have a EMP tabular form
    select
    "ROWID",
    "EMPNO",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO"
    from "#OWNER#"."EMP" I need a Select List for DEPTNO for each record of table. After set a value, the second "Select List" for ENAME should be affected automatically.

  • Select List (query based LOV) in a wizard created report form

    I have created an updatable report form with 3 columns:
    app_id
    user_id
    group_id
    Each app_id has multiple group_id's associated with it, and I want to show the group_id field as a Select List (query based LOV) that contains the groups associated with the app_id.
    My query for the select list needs to be similar to the following:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The problem is, I don't know how to reference the app_id from the main report to replace the ?????.
    In other words, if my report returns 2 rows of data like this:
    app_id----------user_id----------group_id
    1-----------------24------------------3
    2-----------------24------------------15
    Then how do I get the group_id column to be a select list of possible groups for each application? If app_id 1 has 3 groups associated with it, 3, 4, & 5 and app_id 2 has 2 groups associated with it, 15 & 16, then those each of the select lists should be based on the app_id.
    Hopefully I explained this clearly.
    Thanks,
    Kris

    Leo,
    Thanks for the response, but I don't think you quite understand my problem. If I go to the Column Attributes screen for the group_id field, I have the "Display As" drop down set to "Select List (query based LOV)", not "Select List (named LOV)". This requires that the sql query be written in the "List of values definition" text area below. Within that text area I have the following query:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The APP_ID that I need to reference is for the current row of data that is being processed. Therefore, I can't use a :PNNN_APP_ID variable, because that field does not exist on the page.
    Hopefully this explains it a little better.
    Thanks,
    Kris

  • Select List (query based LOV) in V. 4.1.1.00.23

    Hi guys,
    I am having some problems with an APEX application that I have exported from V. 4.1.0.00.32 and imported on V. 4.1.1.00.23.
    I have a Tabular Form region where I have a column which is Display As "Select List (Query based LOV)".
    If I add a new row - choose a new value (not the same as any of the above rows) and "Apply Changes"/"Submit" the value in the new row changes to the value of the 1. row of the tabular form :-( I can update this new row and then it saves the right value... It looks like it is only when inserting a new row.
    Is this a bug or is it a feature ;-)
    Hope you can help...
    /Rene

    Leo,
    Thanks for the response, but I don't think you quite understand my problem. If I go to the Column Attributes screen for the group_id field, I have the "Display As" drop down set to "Select List (query based LOV)", not "Select List (named LOV)". This requires that the sql query be written in the "List of values definition" text area below. Within that text area I have the following query:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The APP_ID that I need to reference is for the current row of data that is being processed. Therefore, I can't use a :PNNN_APP_ID variable, because that field does not exist on the page.
    Hopefully this explains it a little better.
    Thanks,
    Kris

  • Character string buffer too small (select list query based LOV)

    Hi,
    Using the select list query based LOV with a select witch is too big, you get this error.
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    When using the Popup LOV query based LOV) then it works nice.
    Can that be solved somehow?
    With the Popup LOV the return value is displayed in stead of the description.

    Hi Andy,
    How do I incorporate your suggestion on a report ?
    Example : I have
    select apex_item.display_and_save(1,column1,5) col1,
    apex_item.display_and_save(2,column2,5) col2 ,
    apex_item.popup_from_query(3, emp_name, 'select user_name, name  empname from table2) col3
    Table 2 is a long list , and I'm getting string buffer too small due to this.
    Your suggestion with HTP is good but I'm not sure how to implement it for reports as I'll like the user to change the values with the select_list.
    I'm not using forms as they want mulit-record on the same page.
    Hope to hear back from you soon.
    Thanks very much.

  • Problem with query based LOV

    Hi,
    Maybe someone could help me with the following. I think it is a shortcoming of HTMLDB, but I'm not sure.
    I've got a Select List item, P10_PERSON, which resides in a tabular form. The Select List is based on a query, say:
    select name   display_value
    ,      id     return_value
    from   personAs is should be, P10_PERSON shows only the names.
    When my action is an insert or modification, the results will be writen in the table PERSON_MEETING.
    Now I want to make sure that the same person coulden't be selected a second time for the same meeting. So I alter the query based LOV with the following:
    select name   display_value
    ,      id     return_value
    from   person
    where  id not in (select person_id
                      from   person_meeting
                      where  meeting_id = :P10_MEETING_ID)This sounds correct and works in Designer, but not in HTMLDB. The NAME isen't shown anymore, instead the ID is shown in the page.
    Is this because the person doesen't actually exists anymore in the LOV after it has been saved (stored in PERSON_MEETING)? If so, does anyone knows a work-around?
    Thx!
    Message was edited by:
    F. Klein
    (removed typing error)

    I've got 3 tables. PERSON, MEETING and PERSON_MEETING.
    They have the following structure:
    # PERSON            #
    # ID   NUMBER       #
    # NAME VARCHAR2(50) #
    # MEETING                   #
    # ID          NUMBER        #
    # DESCRIPTION VARCHAR2(100) #
    # PERSON_MEETING    #
    # ID         NUMBER #
    # PERSON_ID  NUMBER #
    # MEETING_ID NUMBER #
    #####################In PERSON there are 3 records, in MEETING there is only 1.
    PERSON:
    ID     NAME
    1      KEVIN
    2      BILL
    3      JOHN
    MEETING
    ID     DESCRIPTION
    1      DEVELOPERS MEETINGNow I want to link the persons to a meeting in the PERSON_MEETING table.
    The column MEETING_ID will be filled automatically through a variable or parameter (I don't know the exact term).
    I defined the PERSON_ID column as an query based select list with the query:
    select name   display_value
    ,      id     return_value
    from   personThis works perfectely, the select list (or lov) shows KEVIN, BILL and JOHN. When I select BILL and save my adjustment, the following record will be shown in PERSON_MEETING
    PERSON_MEETING
    ID     PERSON_ID     MEETING_ID
    1      2             1Now that I inserted BILL as a participant for the Developers meeting he should be removed from the select list. Only KEVIN and JOHN should be in the list. Therefore I change the query of the select list into:
    select name   display_value
    ,      id     return_value
    from   person
    where  id not in (select person_id
                      from   person_meeting
                      where  meeting_id = :MEETING_ID):MEETING_ID is the item in the page containing the ID of the meeting.
    When I make this adjustment, the select list only contains KEVIN and JOHN (as it should), but the first record shown on the page (record with BILL) doesen't show BILL anymore, instead his ID will be shown (2)...

  • PopUp LOVs in tabular forms

    Hi,
    I've discovered a problem using Popup LOVs in tabular forms, whereby on selecting a value from the LOV the key value is displayed on the form instead of the display value.
    Having searched this forum it would appear I'm not the only one who has encountered this problem, but I've had no luck in finding an explanation for this behaviour or a solution / workaround.
    Can anyone help?
    Thanks
    Andrew.

    A Popup LOV is just a normal Input field with the option to popup another window, select a value and return that value to the field. On the popup window, the "display" value is shown to the user to make it easier to select the right value, but the "return" value is returned to the field as this is the value that needs to be stored on the database.
    As a normal input field, it can only hold and, therefore, display one value.
    Select Lists, on the other hand, store the "return" value but show the "display" value because that is how Select Lists are designed to operate.
    You can show the "display" value in a second field for data that is already on the database by using the "Display as Text (based on LOV, does not save state)", based on the same database column as for the Popup LOV field and using the same LOV table.
    However, the only way to get a "display" value for a new/edited record would be to either submit the page or design your own popup which can pass values back into two fields. Either way, you need two fields.
    Unless someone else has found a way around this?????
    Regards
    Andy

  • SELECT QUERY  BASED ON SECONDARY INDEX

    Hi all,
    CAN ANYONE TELL ME HOW TO WRITE SELECT QUERY BASED ON SECONDARY INDEX.
    IN WHAT WAY DOES IT IMPROVE PERFORMANCE.
    i KNOW WHEN CREATING SECONDARY INDEX I NEED TO GIVE AN INDEX NO -iT SHOULD BE ANY NUMBER RIGHT?
    I HAVE TO LIST ALL PRIMARY KEYS FIRST AND THEN THE FIELD FOR WHICH I AM CREATING SECONDARY INDEX RIGHT?
    LETS SAY I HAVE 2 PRIMARY KEYS AND I WANT TO CREATE SEONDARY INDEX FOR 2 FIELDS THEN
    I NEED TO CREATE A SEPERTE SECONDARY INDEX FOR EACH ONE OF THOSE FIELDS OR ONE SHOULD BE ENOUGH
    pLS LET ME KNOW IF IAM WRONG

    HI,
    If you cannot use the primary index to determine the result set because, for example, none of the primary index fields occur in the WHERE or HAVINGclauses, the system searches through the entire table (full table scan). For this case, you can create secondary indexes, which can restrict the number of table entries searched to form the result set.
    You create secondary indexes using the ABAP Dictionary. There you can create its columns and define it as UNIQUE. However, you should not create secondary indexes to cover all possible combinations of fields.
    Only create one if you select data by fields that are not contained in another index, and the performance is very poor. Furthermore, you should only create secondary indexes for database tables from which you mainly read, since indexes have to be updated each time the database table is changed. <b>As a rule, secondary indexes should not contain more than four fields</b>, <b>and you should not have more than five indexes for a single database table</b>.
    <b>What to Keep in Mind for Secondary Indexes:</b>
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eb2d446011d189700000e8322d00/content.htm
    http://www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
    Regards
    Sudheer

  • HTML in SQL for tabular form

    I am trying to use HTML directly in SQL statement for tabular form (see SQL below). When the tabular form runs it is not converting the HTML so it displays as this:
    Manala<span style="color:blue;">pan</span>
    Am I missing something?
    select
    "PK_ID",
    "CODE",
    decode(instr(upper(city_name),upper(:P3_SEARCH)),
    0, city_name,
    substr(city_name,1,
    instr(upper(city_name),upper(:P3_SEARCH)) - 1)
    || '<span style="color:blue;">' ||
    substr(city_name, instr(upper(city_name),upper(:P3_SEARCH)),
    length (:P3_SEARCH))
    || '</span>' ||
    substr(city_name, instr(upper(city_name),upper(:P3_SEARCH)) + length(:P3_SEARCH) )) "CITY_NAME",
    "STATE_CODE"
    from "#OWNER#"."ZIP"
    where upper(city_name) like '%' || upper(:P3_SEARCH) || '%'

    Right. The HTML is correct but the only way it will display right is when I changed the field attribute to 'Standard Report Column'. Unfortunately, that removes the field from being a text field (input).

  • Select query based on userinput

    Hi Folks...
    I posted this in another forum, but no reply,so I am posting it here too. I am trying to make a select query based on a user input. Earlier I was having probelms making a select query and printing out the result in the stack trace,with the advice given, I managed to solve that. I am now modifying that code to make a query based on user input, however it's not working, following is the code:
    String userId = request.getRemoteUser();  String sql = "SELECT hoursused FROM sysuser WHERE iduser = ?";    try      {        Connection connection = dataSource.getConnection();        PreparedStatement preparedStatement = connection.prepareStatement(sql);        preparedStatement.setString(1, userId);                ResultSet srs = preparedStatement.executeQuery(sql);                            while(srs.next()) {                          String hoursused = srs.getString("hoursused");                          System.out.println("The hours used are " + hoursused);    }                  }    catch (SQLException e)      {    e.printStackTrace();    }        } 
    stack trace seems to suggest I may have a probelm with this statement:
    "SELECT hoursused FROM sysuser WHERE iduser = ?"; 
    I am not sure how to rectify this, I hope someone can advise, thanks.

    Hi jschell..
    Thanks for responding, I appreciate it. The problem has been solved. No 'sysuser' is not a reserved word in Mysql. Based on the advice given in another forum and also from this site, I managed to solve the problem. I only made one change. This:
    ResultSet srs = preparedStatement.executeQuery(sql);     was changed to this:
    ResultSet srs = preparedStatement.executeQuery();  Thanks.

  • Select Query Based on date condition

    Hi ,
    Is it Possible.
    i want to run select query based on date condition.
    Eg...
    if the date between 01-jan-01 and 01-jan-05 then
    select * from table1;
    if the date between 02-jan-05 and 01-jan-08 then
    select * from table2;
    Becaz i have data in 2 diffrent tables , based on the date condition i wnt to run the select statement to diffrent tables.
    i dont want plsql here Just SQL needed.
    thanks,
    -R
    Edited by: infant_raj on May 5, 2009 11:48 PM

    Helo Kanish,
    this is not the one i was asking..
    wht i mean was .
    i use bind variable to get date while running the select statement , once i get the date then i want to choose any one of the table to run select query.
    EG..
    select col1,col2 from table1 where date between only if 01-jan-01 and 01-jan-05;
    select col1,col2 from table2 where date between only if 02-jan-05 and 01-jan-08;
    Run any one of the two . not all
    thanks,
    _raj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Multi Row Update for Tabular Form

    1) I'm trying to understand how the built-in MRU works for tabular forms: While running through every row, does it check for changes before issuing an UPDATE or does it blindly UPDATE every row in the current pagination range?
    2) If I need to write my own Multi Row Update process for tabular forms, could someone give me some tips on how to do that?
    Thanks,
    Pavel

    1) It stored a checksum for each row that it renders. It calculates the checksum again before processing the rows. The UPDATE statement it issues has a predicate like where old_checksum!=new_checksumSo, it only updates the rows that have at least 1 column value that is different (causing the row checksum to be different)
    2) See the howto at http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html

  • Manual tabular form and query based LOV

    Happy new year everyone!
    Okay so, I've run into an error when making one of the fields in a tabular form into a select list.
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    The query works fine in SQL Workshop and Toad, it returns over 100 rows.
    I have tried to use a Popup LOV, which works but I'd like to know what is going wrong with the select list.
    We're using version 3.0.1.00.07 of apex, for what it's worth.
    Help appreciated!
    Kieran
    Message was edited by:
    Kieran

    Keiran,
    In the select list there is a display value and a return value.
    The return value is the Foreign Key and the Display value is what is displayed in the LOV.
    Are you getting these the wrong way round ?
    I usually put the return value first and alias is with r and put the display value second and alias the display value with d.
    Hope this helps
    Regards
    Chris

Maybe you are looking for

  • Define event to repeat on the last day of each month?

    (I've searched the forum and can't find this question addressed) I want to create a repeating event for the last day of each month. Is this possible?

  • I can't export Final Cut Express HD movie to QT

    I do realize the error of my ways. I installed an old copy of FCE HD onto my MBP with Snow Leopard (10.6.3). I really wish I knew SL only supports FCE4 before I edited a 2-hour movie. I've seen discussion on this forum about installing Quicktime 7 fr

  • Mavericks unable to connect to Time Capsule

    Have just set up new (Late 2013) Retina MacBook Pro with Mavericks into existing TimeCapsule. I turned on Time Machine and the initial backup went fine. Subsequent attempts to backup result in an error message of "There was an error connecting to the

  • Widescreen Issues

    Hi folks I'm running Quicktime 7.1 Pro and a Miglia TVMini on a Mac Mini with a widescreen display. Since i upgraded to the current version of quicktime all 16:9 programmes or 16:9 QT files are now letterboxed. (Auto Aspect on the TVMini is just pure

  • Adding itemCreationPolicy="immediate" on mx:Panel causes null object reference error in Flex 4.x

    The itemCreationPolicy works fine with spark components and other mx component until we hit by mx panel. Looks like an error is thrown from StyleProtoChain. The interesting thing is the null object reference error both occurs in Flex 4.0 and Flex 4.1