Display select list from query on manual tabular form

Hello,
I'm trying to display a select list from query on a manual tabular form. I'm using a collection to store the data. I can't seem to get the query to work. I can display the item as a text item. Any help would be appreciated. Thanks, Elizabeth.
SELECT
-- Notice how I'm keeping the idx value the same as the column value in the collection. This helps to keep things organized
-- I also apply an id to each entry
-- I append the error value to the empname and sal
-- The Seq_id. Usefull when hiding rows (for delete) and then submitting from
apex_item.hidden(1,x.seq_id, null, x.seq_id || '_seq_id') ||
-- The Primary Key of the column
apex_item.hidden(2, x.ceah_people_id, null, x.seq_id || '_ceah_people_id') || x.ceah_people_id ceah_people_id,
-- Employee Name
case when x.seq_id = -1
then
apex_item.select_list_from_query (3,
NULL,
'select distinct language_name d, '
|| 'language_id r from foreign_language',
'style="width:170px" ' ,
'YES',
'0',
'- Select Language -',
'x.seq_id_' || LPAD (9900 + LEVEL, 4, '0'),
NULL,
'NO'
else
apex_item.text (3,(select language_name from foreign_language where x.language_id = foreign_language.language_id),
80,
100,
'style="width:170px" readonly="readonly"',
'f32_' || LPAD (ROWNUM, 4, '0')
end
|| err.language_id language_id,
/* apex_item.text(3,x.language_id,null, null, null, x.seq_id || '_language_id') || err.language_id language_id,
-- Employee Salary
apex_item.text(4,x.proficiency, null, null, null, x.seq_id || '_proficiency') || err.proficiency ||
-- Store the sql action type as well.
apex_item.hidden(50,x.sql_action_typ, null, x.seq_id || '_sql_action_typ_id') proficiency,
-- Last but not least the row error
err.row_error
FROM (SELECT ac.c001 seq_id,
ac.c002 ceah_people_id,
ac.c003 language_id,
ac.c004 proficiency,
ac.c049 modifiable_flag,
ac.c050 sql_action_typ
FROM apex_collections ac
WHERE ac.collection_name = 'DATA_COLLECTION'
ORDER BY ac.seq_id) x,
-- Error Collection
(SELECT ac.seq_id seq_id,
ac.c002 ceah_people_id,
ac.c003 language_id,
ac.c004 proficiency,
ac.c050 row_error -- Useful when individual data is correct, however the row of data is not. Ex: start/end dates
FROM apex_collections ac
WHERE ac.collection_name = 'ERROR_COLLECTION'
ORDER BY ac.seq_id) err
WHERE x.seq_id = err.seq_id(+)

I got so frustrated I started over. I'm following the how to create a manual form.
http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html#MANUAL
The problem I'm now having is even though I display items as hidden, there is a column holder on the report for them. If I go into the report attributes and toggle the show attribute off I cannot reference an items value in my logic. I used /&nbsp/ for the column heading but I still get the little sort arrow where the column heading should be. I tried to toggle the sort attribute off but the sort arrow still shows up. How can I use the apex_item.hidden and not get a place holder for the column on a report? Thanks, Elizabeth
Here is the code I'm using to generate the report:
select x.ceah_people_lang_id,
x.language_id,
x.proficiency,
x.ceah_people_id
from (
select apex_item.hidden(1,ceah_people_lang_id) ceah_people_lang_id,
apex_item.select_list_from_query(2,language_id,'select language_name, language_id from foreign_language') language_id,
apex_item.select_list_from_query(3,proficiency,'select name, id from proficiency') proficiency,
apex_item.hidden(4,ceah_people_id) ceah_people_id
from ceah_people_language where ceah_people_language.ceah_people_id = :P152_person_id
union all
select apex_item.hidden(1,null) ceah_people_lang_id,
apex_item.select_list_from_query(2,null,'select language_name, language_id from foreign_language') language_id,
apex_item.select_list_from_query(3,null,'select name, id from proficiency') proficiency,
apex_item.hidden(4,null) ceah_people_id
from dual) x

Similar Messages

  • Select list from query in report

    Hello everybody,
    I want to include a select list from a query in a report's colomn, but the select list should only be displayed conditionally. I wanted to do this with the help of "case when" in the corresponding SQL statement.
    The select list itsself works, but when I combine it with "case when" I always get the error message:
    ORA-01427: single-row subquery returns more than one row
    The select statement is as following:
    select
    htmldb_item.checkbox(1,rownum) " ",
    x.idee,
    x.stunden_ilp,
    x.stunden_ild,
    x.stunden_ilm,
    x.stunden_ief,
    x.stunden_ir,
    x.pe_id,
    x.l_art_id,
    x.version_id
    from (
    select
    (select case
    when (select name from cn_pl_projektidee s01
    where s01.idee_id = '2') IS NULL then
    (select distinct htmldb_item.select_list_from_query(5,name,'select distinct name from cn_pl_projektidee') name from cn_pl_projektidee s01
    where s01.idee_id = t1.idee_id)
    else
    (select distinct htmldb_item.text(5,name) name from cn_pl_projektidee s01
    where  s01.idee_id = t1.idee_id)
    END from cn_pl_std_peplanung t1) Idee,
    from cn_pl_std_peplanung t1, cn_pl_projektelemente z1, cn_pl_version u1, cn_pl_projektidee s1
    where t1.version_id = '&P6_VERSION_WAHL.'
    and t1.pe_id ='&P6_HELP_PRODET.' 
    and t1.l_art_id ='&P6_L_ART_ID.'
    group by t1.pe_id, t1.version_id, t1.idee_id, t1.l_art_id) x
    order by x.ideeDoes anybody know what could be the problem or what other solutions I could try??
    Greetings!
    Patrick

    Found 2 ways to solve it:
    *1. dynamic action (JQuery)*
    $("#f20_1234 option[value=13]").attr('selected', 'selected');
    *2. process*
    BEGIN
    HTP.p('<script type="text/javascript">');
    --HTP.p('problem()');
    HTP.p('html_SetSelectValue(''f20_903'',188)');
    HTP.p('html_SetSelectValue(''f20_903'',189)');
    HTP.p('</script>');
    END;

  • A select list from query question

    Hello all - I've looked in detail at a great deal of posts on this subject and believe what I am trying to achieve is not unusual or out of scope. Therefore it's likely me mis-interpreting something and I'd be grateful for anybody's input.
    I have the following as a column in a report
    apex.select_list_from_query( 21,
              a.reserved_by,
              'select g.user_name,g.user_id
              from users g, user_roles h
         where g.user_id=h.user_id and h.role_id in (2,3)'
         , null ,
         'YES',
         '-1',
         '- Not Reserved -') slov1 ,
    If 'reserved_by' is null, I want '- Not Reserved -' to appear in the select list, otherwise I want the value in user_name. Where reserved_by is not null, I get the appropriate user_name returning the appropriate user_id. Where reserved_by is null, I get null returning null in the select list.
    '- Not Reserved -' which is the value I've tried to assign to p_null_text, also appears in the select list and returns '-1' . However '-Not Reserved-' only appears as an extra option, rather than becoming the display value for reserved by=null.
    So, if the values in reserved_by are 'user1','user2' and null and the P_query returns
    'user1',1
    'user2',2
    'user3',3
    my select list for the row having reserved_by=NULL looks like
    user1
    user2
    user3
    - Not Reserved -
    NULL (ie blank).
    Following a suggestion in a thread from 2005(!), I changed the p_query to
    'select g.user_name,g.user_id
    from users g, user_roles h
    where g.user_id=h.user_id
    and h.role_id in (2,3) union ALL
    SELECT ''- Not Reserved -'' user_name, 0 user_id from dual',
    null, NO'
    and set p_show_null to 'NO'. This achieves the functionality I want. So perhaps, though I can't figure out what I was doing wrong with the 'correct' usage. Anyway, I'll post this in case it proves useful to others!
    Toby

    Hi Apex Experts,
    can some one suggest me an alternate way to achieving this. I really have no idea on how to take this forward. :(
    Any help/pointers will be highly appreciated.
    Thanks,
    Satya.
    Edited by: Chaitu_Apex on May 13, 2010 3:50 AM

  • PL/SQL select list from query

    Hello,
    I am trying to modifying a PL/SQL process. Wherever there was a reference to the Application ID, I wanted to change it to refer to the Application Alias.
    Here is the original code:
    declare
       cursor app_cur is
          select aa.application_id||' - '||aa.application_name app_name,
                 aa.application_id
            from apex_applications aa
           where exists (select 1
                           from profiles p
                          where p.application_id = aa.application_id);
       cursor user_app_cur (p_user number, p_app number) is
          select to_char(profile_id)
            from user_app_profiles
           where user_id = p_user
             and application_id = p_app;
       v_profile   varchar2(10);
       v_count     number := 0;
       v_class     varchar2(15);
    begin
       htp.p('<table class="t3standardalternatingrowcolors" cellpadding="0" cellspacing="0">');
       htp.p('<tr><th class="t3header" >Application</th><th class="t3header" >Profile</th></tr>');
       for app in app_cur loop
          v_count := v_count + 1;
          if mod(v_count,2) = 1 then
             v_class := 't3dataalt';
          else
             v_class := 't3data';
          end if;
          open  user_app_cur(:P3_USER_ID, app.application_id);
          fetch user_app_cur
           into v_profile;
          if user_app_cur%notfound then
             v_profile := 'NONE';
          end if;
          close user_app_cur;
          htp.p('<tr><td class="'||v_class||'">'||app.app_name||
                '</td><td class="'||v_class||'">'||
                apex_item.select_list_from_query(40, v_profile,
                  'select description, profile_id from profiles where application_id = '||app.application_id,
               null, 'YES', 'NONE', 'No Profile Assigned', null, null, 'NO')||
                apex_item.hidden(41,app.application_id) ||
              '</td></tr>');
       end loop;
       htp.p('</table>');
    end;Here is my revised code:
    declare
       cursor app_cur is
          select aa.alias||' - '||aa.application_name app_name,
                 aa.alias
            from apex_applications aa
           where exists (select 1
                           from profiles p
                          where p.application_alias = aa.alias);
       cursor user_app_cur (p_user number, p_app varchar2) is
          select to_char(profile_id)
            from user_app_profiles
           where user_id = p_user
             and application_alias = p_app;
       v_profile   varchar2(10);
       v_count     number := 0;
       v_class     varchar2(15);
    begin
       htp.p('<table class="t3standardalternatingrowcolors" cellpadding="0" cellspacing="0">');
       htp.p('<tr><th class="t3header" >Application</th><th class="t3header" >Profile</th></tr>');
       for app in app_cur loop
          v_count := v_count + 1;
          if mod(v_count,2) = 1 then
             v_class := 't3dataalt';
          else
             v_class := 't3data';
          end if;
          open  user_app_cur(:P3_USER_ID, app.alias);
          fetch user_app_cur
           into v_profile;
          if user_app_cur%notfound then
             v_profile := 'NONE';
          end if;
          close user_app_cur;
          htp.p('<tr><td class="'||v_class||'">'||app.app_name||
                '</td><td class="'||v_class||'">'||
                apex_item.select_list_from_query(40, v_profile,
                  'select description, profile_id from profiles where application_alias = '||app.alias,
               null, 'YES', 'NONE', 'No Profile Assigned', null, null, 'NO')||
                apex_item.hidden(41,app.alias) ||
              '</td></tr>');
       end loop;
       htp.p('</table>');
    end;Here is the error:
    ORA-06550: line 1, column 153: PL/SQL: ORA-00904: "F109NEWNAME": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
    I think that the problem is in the table/LOV generation near the end, but I don't fully understand the apex_item.select_list_from_query function as it is written (I didn't write it).
    Any help is greatly appreciated.
    Thanks,
    Matt

    Hi Matt,
    This line:
    'select description, profile_id from profiles where application_alias = '||app.aliaswould become:
    select description, profile_id from profiles where application_alias = F109NEWNAMEif F109NEWNAME was the app_alias. SQL would see F109NEWNAME as a variable as it is not in quotes. Therefore, you should change the line to:
    'select description, profile_id from profiles where application_alias = ''' || app.alias || ''''to end up with:
    select description, profile_id from profiles where application_alias = 'F109NEWNAME'which would make more sense
    Andy

  • Using select list as default value in tabular form.

    Hi,
    I am using Application Express 4.1.0.00.32. I have two questions that are related.
    I have a Select item *'P1_SELECT'* and a tabular form My Items.
    Question 1. The My Items tabular form col1 Attributes are set Display As Text Field, and the Tabular Form Attributes are set Default Type = item(application or page item name), Default = P1_SELECT. I have checked the session state value is set on P1_SELECT ie. Fred. What I need to know is, why, when adding a row to the tabular form My Items does col1 not display 'Fred' as the default value from the select item P1_SELECT? I can change col1 of the Tabular form to be Display as Text (save state) and this will work. However that leads me on to:
    Question 2. After adding say 3 rows to the form, I then change the select P1_SELECT value to Bob and Bob is now set in session state on the P1_SELECT item, but when I again add row to the form the value Fred is still the value not Bob. It seems that the tabular form keeps the default value as Fred and not Bob. How can I get this to look or work like:
    col1_
    Fred
    Fred
    Fred
    Bob
    Your help is needed.
    Thanks.

    Howard (DBA in Training) wrote:
    Do you submit the page or set the value after changing the selection? If not, the display value seems to be Bob but the working value is still Fred. That's what you are seeing right? In the "Settings" section, what do you have for "Page Action when Value Changed". I've been using "Redirect and Set Value" because I was staying on the same page after the selection.
    Additional info which might be helpful (or NOT). ====================
    NOTE: I am just a novice's novice with APEX and I had much agony with Select Lists. It was challenging to have the Select List value displayed because there seem to be so many different sources of the Select List value, namely:
    1) the current value in the session state
    2) the value you can specify in "Source value or expression" in the "Source" section of the Select List item
    3) the value you can specify in the "Post Calculation Compution" in the "Source" section of the Select List item
    4) the value you can specify in the "Default value" of the "Default" section of the Select List item
    [Now, if I've misdescribed any of these, remember, this is from a novice's perspective.]
    It's like putting a clock (back) together. Get any of the pieces wrong and it will probably not work right.
    I had an addiitonal challenge in that I wanted the same Select List displayed on multiple pages and for the currently selected value (from the former page) to already be set on the new page when it was displayed. What fun!
    To see what I did here: http://apex.oracle.com/pls/apex/f?p=43250:101 login Dever/Ima9Dever
    Remember, I'm doing many things you will likely not need to do. I iniitalized the Select List for the first time it displayed. I copied the Select List value from old page to new page by storing it in an application item F217_SYS_NIC_NM.
    Best wishes,
    HowardHi Howard,
    You don't have submit the page for just setting one item's session state. you can use a Dynamic Action OR use Page Items to Submit property if available (this is available in various places such as sql region,chart region etc)
    In context to this question you don't have to do any of those..just see my example above
    Thanks

  • Manual Tabular Form Formatting Questions

    Hello, this is my first time using a tabular form and am now trying to tackle creating a manual tabular form. So, now I have some questions on formatting.
    1. Is it proper on this forum to lump several similar questions together or should these be separate postings?
    2. I have a hidden column that I do not want to display on the screen at all. However, I need access to the column later when saving. I am currently using the htmldb_item.hidden function to retrieve the field. This works. However, the column still displays but the value does not display. I then tried to uncheck the show attribute for the column to unchecked. Unfortunately, if this is not selected, when using the htmldb_application.g_f01 function, I would receive an error as if the column did not exist. How do I make the column totally hidden so that it does not display at all?
    3. I have a number column where I want the column to display in dollars (i.e. $100, 000). I tried to set the number format on the column in the report attributes. However, no luck. To retrieve the column, I am using the function htmldb_item.text to retrieve the column. I am not sure if I should be able to format the column in the report attributes or if the htmldb_item.text function has a parameter that I could use for formatting. Suggestions?
    4. Similarily, I would like to right justify this column. How is this accomplished?
    Thanks

    Hi everyone,
    Is there any way to not to display the hidden columns in the manual tabular forms,when we create the manual tabular form using htmldb_item.hidden.
    But need to refer that column in the process.
    In the wizard generated tabular form if the column is of type HIDDEN we dont see that column on the report.
    How can i achieve the same in manual tabular forms..
    Thanks

  • Select List in Manual Tabular Form based on a previous column

    I have a manual tabular form that have several columns One column (vendor) is a select list that should be based on a previous column (Vendor Type - Internal/External). So if the user selects Internal for Vendor Type, the Vendor column's select list should only contain those vendors with type of Internal. By the way, it also uses APEX collections.
    select
      apex_item.hidden                   (1,C015) STATUS,
      apex_item.checkbox                 (2,SEQ_ID,'title="check to delete"') CHECKBOX,
      case
        when (c001 is not null and c002 is not null) then
          '<a onclick="return false;" href="f?p='||:APP_ID||':20:'||:APP_SESSION||'::NO:20:P20_ID,P20_REQ_ID,P20_SEQ_ID:'||C001||','||C002||','||SEQ_ID||'"><img alt="" src="/i/ed-item.gif"></a>'
      end ||
      apex_item.hidden                   (4,C001) ID,
      apex_item.hidden                   (5,C002) JOB_QUOTE_ID,
      apex_item.date_popup2              (6,C003,'MM/DD/YYYY',11,2000,'onChange="f_set_end_date(this.id,'|| ROWNUM || ');"') ||
      apex_item.select_list_from_query   (7,C004,'select svcs_description d, svcs_code r from csrsr_service_codes order by 1 asc',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.date_popup2              (8,C005,'MM/DD/YYYY',11) ||
      apex_item.text                     (9,C006,8,15,'style="text-align:right;"') || '<BR />' ||
      apex_item.select_list              (10,C007,'Staff;S,External;E',null,'YES',null,'-Select-') ||
      apex_item.select_list_from_query_xl(11,C008,'select vendor_name d, vendor_number r from csrsr_vendors_v',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.text                     (12,C009,50,100,'colspan=2') COL12,
      apex_item.text                     (13,to_char(to_number(C010),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT1,
      apex_item.text                     (14,to_char(to_number(C011),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT2,
      apex_item.text                     (15,to_char(to_number(C012),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT3,
      apex_item.text                     (16,to_char(to_number(C013),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT4,
      apex_item.hidden                   (24,C001) ||
      apex_item.hidden                   (25,C002) ||
      apex_item.hidden                   (3,SEQ_ID) ||
      apex_item.text                     (17,to_char(to_number(C014),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') CHBK_AMT,
      'value' COLTYPE
    from
      apex_collections
    where
      collection_name = 'CSRSR_JOBCOSTS_C' and
      C015 in ('O','U','N')
    union all
    select
      apex_item.hidden                   (1,null) STATUS,
      apex_item.checkbox                 (2,null,'title="check to delete"') CHECKBOX,
      apex_item.hidden                   (24,null) ||
      apex_item.hidden                   (4,null) ID,
      apex_item.hidden                   (25,null) ||
      apex_item.hidden                   (5,null) JOB_QUOTE_ID,
      apex_item.date_popup2              (6,null,'MM/DD/YYYY',11,2000,'onChange="f_set_end_date(this.id,'|| ROWNUM || ');"') ||
      apex_item.select_list_from_query   (7,null,'select svcs_description d, svcs_code r from csrsr_service_codes order by 1 asc',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.date_popup2              (8,null,'MM/DD/YYYY',11) ||
      apex_item.text                     (9,null,8,15,'style="text-align:right;"') || '<BR />' ||
      apex_item.select_list              (10,null,'Staff;S,External;E',null,'YES',null,'-Select-') ||
      apex_item.select_list_from_query_xl(11,null,'select vendor_name d, vendor_number r from csrsr_vendors_v',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.text                     (12,null,50,100,'colspan=2')  COL12,
      apex_item.text                     (13,null,10,15,'style="text-align:right;"') AMT1,
      apex_item.text                     (14,null,10,15,'style="text-align:right;"') AMT2,
      apex_item.text                     (15,null,10,15,'style="text-align:right;"') AMT3,
      apex_item.text                     (16,null,10,15,'style="text-align:right;"') AMT4,
      apex_item.hidden                   (24,null) ||
      apex_item.hidden                   (25,null) ||
      apex_item.hidden                   (3,null) ||
      apex_item.text                     (17,null,10,15,'style="text-align:right;"') CHBK_AMT,
      'value' COLTYPE
    from
      dual
    How can I accomplish this?
    Application Express 4.1.2    
    Oracle 10g Rel 2
    Robert

    Hi,
    Then you are probably looking cascading select list in tabular form?
    http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:2003800346210117
    Regards,
    Jari

  • Query for create manual tabular form using apex collection using item textfield with autocomplete

    can we create a manual tabular form inside item textfield with autocomplete ?
    how it is possible?
    with Apex_item API used for this item.
    i used this code for creat  cascading select list
    select seq_id,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   1,
            p_value                     =>   c001,
            p_query                     =>   'SELECT C001 D
         , C002 R
      FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = ''col1''',
            p_attributes                =>   'style="width:150px" onchange="f__name(this,parseInt(#ROWNUM#));"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f01_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f01_#ROWNUM#',
            p_show_extra                =>   'NO') name,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   2,
            p_value                     =>   c002,
            p_query              =>   ' SELECT null d, null r FROM dual WHERE 1 = 2
            p_attributes                =>   'style="width:150px"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f02_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f02_#ROWNUM#',
            p_show_extra                =>   'NO')name2,
    from apex_collections
    where
    collection_name = 'COLLECTION1'
    It is fine .
    but i want item in tabular form  textfield with autocomplete and remove select list. my requirement is using textfield with autocomplete select a employee name and second item textfield with autocomplete display dependent perticular employee related multiple task.
    how it is created.i have no idea related textfield with autocomplete.Please help me....

    pt_user1
    I understand that the add row button is currently doing a submit.
    To not submit the page you need a dynamic action on the page.
    Does the javascript function addRow do what you want?
    Otherwise have a look at the following two threads Add row in manual tabular form using dynamic action and Accessing Tabular Form & Add Elements to Collection without Page Submit.
    You're process could be something like:
    Add the new values to the collection using the idea's in the second thread and at the same time add the new row.
    And as second action refresh your tabular form.
    If you get stuck set up what you have done on apex.oracle.com using the tables from the demo application.
    Nicolette

  • Trouble using pipelined function in an select list lov query

    I'm trying to use a pipelined function in a select list lov query but i cet the error
    "LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query."
    my query is as follows :
    SELECT gt.navn d, gt.GEOGRAPHY_TYPE_ID r
    FROM GEOGRAPHY_TYPE gt
    WHERE gt.kode NOT IN (1)
    and gt.kode in (select lov_value from table(RAPPORT_FILTER_PKG.GET_RAPPORT_FILTER_VALUE_PIP (
    SYS_CONTEXT ('rapport_filter_ctx','filter_id'),'GEOGRAPHY_TYPES')) )
    ORDER BY gt.navn DESC
    if i use a discrete values '80' instead of the call to
    SYS_CONTEXT ('rapport_filter_ctx','filter_id')
    i don't get eny errors, but then the LOV isn't as dynamic as i has to be
    any idears???
    Edited by: [email protected] on Dec 1, 2008 8:50 AM
    Edited by: [email protected] on Dec 1, 2008 11:17 AM

    nope that doesn't do it either
    contains a syntax errror at
    SYS_CONTEXT (('rapport_filter_ctx',:P500_RAPPORT_FILTER_ID),'GEOGRAPHY_TYPES'))
    my theory is that it's got something to do with the way APEX binds values because
    the query
    SELECT gt.navn d, gt.GEOGRAPHY_TYPE_ID r
    FROM GEOGRAPHY_TYPE gt
    WHERE gt.kode NOT IN (1)
    and gt.kode in (select r from table(RAPPORT_FILTER_PKG.GET_RAPPORT_FILTER_VALUE_PIP ('80','GEOGRAPHY_TYPES')) )
    ORDER BY gt.navn DESC
    works fine in both TOAD and in APEX but as soon as i replace th '80' with :P500_RAPPORT_FILTER_ID then, apex won't accept the code??????
    Edited by: [email protected] on Dec 3, 2008 7:54 AM

  • Query for create manual tabular form using apex collection add row button functionality

    Hello everyone
    My requirement is i created a tabular form manually using apex collection but if i click on add row button then previously selected data refreshed and added new row in this form it is fine.but i don't want to refreshed previously selected data and click on add row button then add new row .how it is possible? plz help
    Thanks & Regards,
    Ujwala

    Ujwala
    Instead of starting a new thread with the same question as Query for create manual tabular form using apex collection add row button functionality.
    Could you answer the question about what you see while debug the javascript code.
    If you don't understand the question or have trouble debug javascript let us know.
    Nicolette

  • Populate Select List from Checkboxes?

    How do I populate a Select List from a checkbox set's checked display values and submitted values?
    I'm guessing I need to parse the colon-delimited values, but I have no idea how to get the display values, or how to put all of that into the Select List.
    Any ideas?
    Cheers,
    Ben

    Hello,
    Every select list item can be based on LOV. You can read more about it in here - http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28550/bldapp.htm#CHDFGFHI
    If you are trying to populate a select list, using JavaScript, you can see a good example in here - http://htmldb.oracle.com/pls/otn/f?p=11933:37
    Hope this helps,
    Arie.

  • Date Picker on Manual Tabular form not working on 4.1 upgrade from 4.0

    Hi
    my application is upgrade from Apex 4.0 to 4.1 .
    Oracle DB is 11g.
    I have a manual tabular form with a date field:- apex_item.text(12,null,15,15,'class="datepicker3"') as end_date, After upgrade to 4.1 it's not working .
    I changed the code to:- apex_item.date_popup2(12,null,15,15) as end_date, still not working .
    I have to use apex_item.date_popup2 .
    Thanks in advance !!!
    -Amu

    Hi Diana,
    Is this you are trying to achieve:
    piepdate = startdate + typeduration
    The id attribute of the items in normal or APEX_ITEM based tabular form are of the type:
    fxx_xxxx
    For example: f10_0001, f10_0002, ..., f10_0010.
    So, correct the vRow variable accordingly
    >
    // get row
    var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    >
    Hope it helps!
    Regards,
    Kiran

  • Error - You may display spool list from your own jobs..

    Hi Team,
    I have created a SAP_ALL Display role for our maintainence members and whenever they are trying to view the spool log in sm37 they are getting the Error - You may display spool list from your own jobs..
    I have checked the following objects :S_SPO_ACT and S_SPO_DEV all those have full authorizations and regenerated and done a user compare and then checked ..getting the same error..
    Could you pls provide your vauable suggestions..
    Regds,
    Satyanarayana N.

    Hello Satya,
    Normal users hardly need access to s_btch_adm with value *. I wonder if your security auditors would agree to it.
    Also 3 is not a valid value for s_btch_adm. Either it can be Yor N. Y mean that the user is batch administrator while N means the user is not. Of course * encompasses all. Try first with N and see if the users are able to see the spool.
    If not then do you have mutiple clients in your system? If so make sure users are trying to see the spool in the correct client i.e they are trying to check a spool generated in client X after logging into client X only.
    Regards.
    Ruchit.

  • Manual tabular form - popup

    I have a couple of problems with the manual tabular form I have created and would appreciate some help,
    First the htmldb_item.popup_from_query is not populating the field when I select the item:
    The query looks something like this:
    Select x.data1,
    x.data2,
    x.data3,
    x.CKS
    From (
    Select htmldb_item.display_and_save(1, data1) data1,
    htmldb_item.text(3, data2, 50) data2,
    htmldb_item.select_list(4,data3,'Yes;Y,No;N') data3
    htmldb_item.md5_checksum(data1,data2, data3) CKS
    FROM my_table
    UNION ALL
    Select htmldb_item.popup_from_query(1, NULL, 'select code || CHR(45) || description descrip, code from PRODUCT_STREAM', 2, 2) data1,
    htmldb_item.text(3, NULL, 50) data2,
    htmldb_item.select_list(4,'N','Yes;Y,No;N')data3,
    htmldb_item.md5_checksum(null,null,null) CKS
    FROM dual
    ) x;
    When this page is run, the existing data is displayed with a blank line at the bottom as expected, it I click on the popup icon a list of codes is displayed, but I cannot click on any of the items to populate the data1 field. If I change the query on the top of the union so the first data1 is also htmldb_item.popup_from_query then it works fine, but data1 cannot (user requirement) be changed by the user, how can I fix this so the popup list works.
    Second thing:
    CKS is showing as another column in the tab form, if I uncheck show it doesn’t work anymore, there us no data showing in the column just the heading, and I can get rid of the text but there is still allocated size for it.

    Why do you have to write the tabular form manually? Why not use the tabular wizard and have the form, including checksums, generated for you? In HTML DB 1.6 you can include options to automatically add new empty rows to your tabular form and have a row selector with delete functionality.
    Neither the manual tabular forms nor the automatically generated tabular forms support mixing display types for columns. Having a display-and-save display type for existing rows and a popup for new rows doesn’t work. All rows, including new ones, have to use the same display type to work properly. If it’s a requirement to have this data1 column be read-only for existing rows, then you need to create a separate form for adding new rows. So e.g. you could have a tabular form only for existing data and an add-row button that takes the user to a data entry form on another page.
    You’re checksum btw shows up in it’s own column because you defined it to be an extra column in your SQL statement. Since it’s just rendering a hidden form field, you could append the checksum to another column:
    htmldb_item.select_list(4,'N','Yes;Y,No;N') ||
    htmldb_item.md5_checksum(null,null,null) data3
    When using manual tabular forms, the column alias names are irrelevant. But again, I’d recommend using the built-in functionality.
    Regards,
    Marc

  • Manual Tabular Form using checksum

    I have a manual tabular form which updates OK but when I add the htmldb_item.mds_checksum it does not always work. It does not pass the MD5 checksum test in the update process. Sometimes it works some times it does not. No one else is updating this data so it should pass the checksum error.
    I need a manual tabular form so I can to retrieve this same data in a collection if the page is submitted for a cascading dropdown in another region. That is correct?
    Of course, I could do the cascading dropdown another way instead of select list on submit. This is puzzling me.
    Here is the sql query:
    select htmldb_item.hidden(1,sub_id) sub_id,
    htmldb_item.display_and_save(2,column_id) column_id,
    htmldb_item.display_and_save(3,column_name) column_name,
    htmldb_item.display_and_save(4,primary_key) primary_key,
    htmldb_item.display_and_save(5,required) required,
    htmldb_item.select_list(6,isselected,'Yes;Y,No;N') isselected,
    htmldb_item.md5_checksum(isselected) cks
    from sub_columns
    where sub_id = :P26_SUB_ID
    order by 2
    Here is the update process:
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    begin
    -- Get original MD5 checksum
    select wwv_flow_item.md5(isselected) cks
    BULK COLLECT INTO
    l_cks
    from sub_columns
    where sub_id = :P26_SUB_ID;
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    rollback;
    raise_application_error(-20001,
    'Current version of data in database has changed '||
    'since user initiated update process.');
    end if;
    end loop;
    -- update Subscription
    for i in 1..htmldb_application.g_f01.count
    loop
    update sub_columns
    set isselected = replace(htmldb_application.g_f06(i),'%'||'null%',NULL)
    where sub_id = :P26_SUB_ID and
    column_id = htmldb_application.g_f02(i);
    end loop;
    commit;
    end;
    Any help would be appreciated. I just don't see what I am doing wrong and I don't see any other way to do it.

    I had already read this paper before doing the tabular form manually. I tried to follow it as closely as I could. My tabular form is a little different since I have a where clause in my SQL and only updating one field. The other fields are display_and_save. And I was branching to a different page than the page containing the tabular form. I would think none of these differences should make it not work. I did change to branch to the same page. That made no difference.
    I did not need to do an insert so I skipped doing that step and then went to Adding Optimistic Locking. It is failuring in my update process with this code:
    -- Get original MD5 checksum
    select wwv_flow_item.md5(isselected) cks
    BULK COLLECT INTO
    l_cks
    from sub_columns
    where sub_id = :P26_SUB_ID;
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    rollback;
    raise_application_error(-20001,
    'Current version of data in database has changed '||
    'since user initiated update process.');
    end if;
    end loop;
    I get the Error process message and then the above -20001 error message when I click on the Submit button. Is there something wrong with my above code? I would assume I would need to add the where clause to the above select since I am only updating whose records.
    I had created a submit button with action submit page and redirect to URL. The process executes on the condition when the submit button is pressed.
    I need to get this working soon. I would assume other people have done a similar thing. I have tried many things. Another thing I notice is if I tell it to not display the first column, sub_id, and the last column, cks, (unselecting display in Report Attributes section) then the update does not work. I must be doing something wrong but I don't know what.
    I created the page with component, report, SQL Report, and region type SQL Query.

Maybe you are looking for

  • Z77a-gd65 no multi drop in idle with fixed vcore ?

    Hi all, I am trying to oc my 2500k on the z77a-gd65 with a normal multi oc and fixed vcore, eist always enabled. interal pll overvoltage auto, intel turbo off, vdrop auto, digitial compensation auto, cpu core ocp expander auto, cpu core switching fre

  • Issue w/Quicktime export from Final Cut Pro 4.1

    I've exported my sequence to a Quicktime movie. For some reason there is white bar across the top of the Quicktime with the text "<cut>" in the center. I went into the project to make some edits, exported it...and this happened. I'm not sure where th

  • How to make Partial Trigger work for a SelectManyShuttle

    Hi, I'm developing a page for user role management. For each role, one or more menus could be assigned to it. We have 3 db table, Role, Menu and RoleMenu. RoleMenu is the intersection table. At UI level, I placed one editable table on the top of a pa

  • LR 3.2 Keyword delete Problem with brush Tool

    I Can't delete any Keyword with the Brush Tool. The brush Icon was not change to the rubber icon when I take the Brush with an exsisting keyword over a photo in the grid view. Uwe

  • TM failing saying there isnt enough space when there is TB's free after upg

    We have a bunch of 2tb drives linked together via fw800 (OSX Software raid) which is maxing out a 9.1TB in total. Time Machine correctly states that 5.3tb will be required to backup. However it wont backup claiming that there isnt enough room on the