Column Collection reference in APEX_ITEM.select_list_from_query

I'm now making reference to a column in my collection in the APEX_ITEM.select_list_from_query function. Below, you can see where I tried this, but I get just an error. Any help would be greatly appreciated, thank you.

APEX_ITEM.select_list_from_query (9, c005,'SELECT WORKLOAD_INDICATOR, wi.) APEX_DATA WORKLOAD_INDICATOR_ID. NURSE_STAFF_WORKLOAD_INDICATOR wi JOIN APEX_DATA. NURSE_STAFF_INDICATORS_WEIGHT w ON wi. WORKLOAD_INDICATOR_ID = w.WORKLOAD_INDICATOR_ID WHERE DEPT_ID = V ("P1_DEPARTMENT") AND (assets = "Y" GOLD wi.) WORKLOAD_INDICATOR_ID = ' | C005. ) GROUP OF WORKLOAD_INDICATOR, wi. Order WORKLOAD_INDICATOR_ID of sum (w.weight) DESC', NULL, 'YES', NULL, 'Select a workload indicator')

What value there c005? If it is empty, then this might explain the error.

If this call to apex_item is part of a larger selection, then show the selection complete. Since you concatenate c005 value in the string without any assertion there are chances of surprising characters, like whites.

Maybe you need to encapsulate a case this whole thing all about expression in order to eliminate cases where c005 has no correct value.

As

cases where c005 is null or no regexp_like (c005, "\D") then

APEX_ITEM.select_list_from_query (9, c005,'SELECT WORKLOAD_INDICATOR, wi.) APEX_DATA WORKLOAD_INDICATOR_ID. NURSE_STAFF_WORKLOAD_INDICATOR wi JOIN APEX_DATA. NURSE_STAFF_INDICATORS_WEIGHT w ON wi. WORKLOAD_INDICATOR_ID = w.WORKLOAD_INDICATOR_ID WHERE DEPT_ID = V ("P1_DEPARTMENT") AND (assets = "Y" GOLD wi.) WORKLOAD_INDICATOR_ID = ' | C005. ) GROUP OF WORKLOAD_INDICATOR, wi. Order WORKLOAD_INDICATOR_ID of sum (w.weight) DESC', NULL, 'YES', NULL, 'Select a workload indicator')

cases of termination

Tags: Database

Similar Questions

  • Binds inside the apex_item.select_list_from_query

    Hello

    Unable to find anything to answer my question...
    Maybe someone has a tip.

    Is it possible to use references to link inside of the where the statement of a query in
    apex_item.select_list_from_query?

    I tried with the # < Columnanme > #-rating but he had no success.

    As seen here
    Re: Bug or what? (SELECT_LIST_FROM_QUERY)

    Denes Kubicek provided an example with #Rownum # as a parameter.
    But I need inside the string query...

    I want to refer to columns of the query to a query in a table as


    Select
    a,
    b,
    c,

    apex_item.select_list_from_query (2, c, ' select x, y of the tab where (z = "#b #") ") sel_col,.

    d,
    e
    FROM MyTable.

    Is this possible?

    Concerning
    Andrée

    Andrée:

    Try this

    select
    a,
    b,
    c,
    apex_item.select_list_from_query (2, c, 'select x, y from tab where (z = ' || b || ')   ) sel_col,
    d,
    e
    from mytable;
    

    CITY

  • apex_item.select_list_from_query in PL/SQL?

    Hello

    I use APEX 4.0 on a 10g database.

    I need to use the apex_item.select_list_from_query function in a PL/SQL program.
    variable varchar2(1000);
    SELECT apex_item.select_list_from_query(1,sel_name,'SELECT sel_name FROM user_selection WHERE id = (SELECT id FROM users WHERE upper(login)=upper(:APP_USER))','style="width:100%;margin-bottom:5px;"','YES','%',' ',null,'label') INTO variable FROM user_selection;
    htp.p(variable);
    Who works only the query returns many rows:
    ORA-01422: exact fetch returns more than requested number of rows
    If I add a where condition to not return clause that one line, it works.
    If I use a cursor, then I loop through the records, it works but I get several drop-down lists.

    Can someone tell me how to use this function in PL/SQL?

    Thank you.

    Yann.

    This is the current or default value. If an existing value of the database is necessary, then there must be a clause where clause to limit the extraction of a line, as you mentioned, for example

    declare
      l_sel_name varchar2(30);
    begin
      SELECT sel_name INTO l_sel_name FROM user_selection WHERE ...
      htp.p(
        apex_item.select_list_from_query(
            1
          , l_sel_name
          , 'SELECT sel_name FROM user_selection WHERE id = (SELECT id FROM users WHERE upper(login)=upper(:APP_USER))'
          , 'style=""'
          , 'YES'
          , '%'
          , ' '
          , null
          , 'label'));
    end;
    
  • Add a column without reference

    I would like to know how to add a column to tabular presentation without reference. I built a report and has been able to do a group in my source code. The tabular presentation is not allowing me to do the same thing. I get an error:

    ORA-01446: cannot select ROWID, or sample, a view with DISTINCT, GROUP BY, etc.

    my code is:

    Select
    'REF_ACTIVITY_TYPE '. "" ACTIVITY_TYPE_NAME "as"STAFF_TS_ACTIVITY_ID. "
    'WORK_ITEM '. "" WR_NUM "as"STAFF_TS_WR_ID. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_MON "as"STAFF_TS_MON. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_TUE "as"STAFF_TS_TUE. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_WED "as"STAFF_TS_WED. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_THU "as"STAFF_TS_THU. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_FRI "as"STAFF_TS_FRI. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_SAT "as"STAFF_TS_SAT. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_SUN "as"STAFF_TS_SUN. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_REF_ID "as"STAFF_TS_REF_ID. "
    'STAFF_TS_DETAILS '. "" STAFF_TS_DETAILS_ID "as"STAFF_TS_DETAILS_ID. "
    SUM ('STAFF_TS_MON' 'STAFF_TS_TUE' 'STAFF_TS_WED' + 'STAFF_TS_THU' + 'STAFF_TS_FRI' + 'STAFF_TS_SAT' + 'STAFF_TS_SUN') AS 'TOTAL '.

    Of
    "STAFF_TS_DETAILS,"
    "WORK_ITEM,"
    "STAFF_TS_SUMMARY,"
    "PLAN_ACTIVITY,"
    'REF_ACTIVITY_TYPE '.
    where
    'STAFF_TS_DETAILS '. "" STAFF_TS_WR_ID "="WORK_ITEM. " "" WR_ID "and
    'STAFF_TS_DETAILS '. "" STAFF_TS_REF_ID "="STAFF_TS_SUMMARY. " "" STAFF_TS_SUMMARY_ID "and
    'STAFF_TS_DETAILS '. "" STAFF_TS_ACTIVITY_ID "="PLAN_ACTIVITY. " "" PLAN_ACTIVITY_ID "and
    'PLAN_ACTIVITY '. "" ACTIVITY_TYPE_ID "="REF_ACTIVITY_TYPE. " "" ACTIVITY_TYPE_ID "and
    'STAFF_TS_SUMMARY '. "" STAFF_TS_SUMMARY_ID "=: P31_HIDDEN_SUMMARY_ID
    GROUP OF 'STAFF_TS_MON', 'STAFF_TS_TUE', 'STAFF_TS_WED', 'STAFF_TS_THU', 'STAFF_TS_FRI', 'STAFF_TS_SAT', 'STAFF_TS_SUN', 'ACTIVITY_TYPE_NAME', 'WR_NUM', 'STAFF_TS_REF_ID', 'STAFF_TS_DETAILS_ID '.


    Can someone share some of their knowledge with me please.

    Ryan

    I think that - which means I'm not sure it's the right way to do it, but - if no one answers, you can try this - that the reason is the fact that the Apex created postings on items in table form. Try to remove these validations of the element, and then apply the changes to your query.

    If it turns out to be OK, recreate validations (PL/SQL) by yourself, if necessary.

  • Custom columns collection

    Hello

    Can someone give me some ideas on how I could get these lines.

    The first part comes from regular tables, but I have no idea how to do the part which would include men and women just below the first part.

    Number of months purchases

    1                          12

    2                          12

    3                          13

    4                          12

    5                          31

    6                          32

    7                          31

    8                          31

    9                          31

    10                         31

    11                         31

    12                         31

    Total 212

    Including men

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    Including women

    1

    2

    3

    ..

    I hope it is clear what I want to achieve.

    Best regards

    In this case, create an analysis that is for both sexes (as in the first part of your original message). In the results tab, change the display of the table and drag the Gender Sections area column. She should group the results by sex according to your second example and will export to Excel correctly.

    Thank you

    GEO

  • Create stationary column that references another column

    I have an analysis with a single column, region.

    I have an another regional director named column that are not included in the analysis.

    When I hover over a value in the column of the region, I would like to see the hover popup to show me the value in the field regional manager.

    I know how to create the first part of the hover using something like this as a custom display format:
    [html]<span title=\""Manager is: "\">#,###
    But I can't understand how I can put the value of the regional Manager column after the "is:" to make the hover says something like Manager is: Sam Smith ".

    Is this possible?

    Don't worry, it's not ;-)

    in any case, that you are looking for this formula in the column:

    '' || "Region"."Region" || ''
    

    Then simply change the data format of the column to format HTML and your Uncle Bob.

  • Apply to a variable to APEX_ITEM. SELECT_LIST_FROM_QUERY

    OS = Windows 7 version

    Version of DB = 10G

    Apex Version = 3.2.1.00.11

    Hello

    Currently, I'm trying to use apex_item.

    I want the order of the SELECT_LIST_FROM_QUERY to display the users at the top of the drop folder.

    I created a view named dbv_team_list;

    select upper (parties.last) || ' ' || upper(parties.first) || ' - ' || skill.skill_level || ' - ' || team_list.status display
         , team_list.team_list_id return
      from dbx_team_list team_list
         , dbx_users users
         , sfm_common.sct_parties parties
         , dbx_skill_level skill
         , dbx_pay_rate pay_rate
    where team_list.user_id = users.user_id
       and users.par_id = parties.par_id
       and team_list.skill_level_id = skill.skill_level_id
       and team_list.pay_rate_id = pay_rate.pay_rate_id
       and team_list.effective_to is null;
    
    
    
    

    I want to use the query named dbv_team_list like this and add an order by (to obtain the registration of the user logged on to appear at the top of the list);

    select display, return from dbv_team_list order by (case return when 3 then 0 else 1 end) asc
    
    
    
    

    I formed what follows as a test to see if I need work and it does.

    SELECT APEX_ITEM.SELECT_LIST_FROM_QUERY(12,NULL,'select display, return from dbv_team_list order by (case return when 3 then 0 else 1 end) asc') "Name"
      FROM DUAL
    
    
    
    
    
    

    I created something called P19_USERNAME to store the value of the column in the view named «BACK» This value is a number.

    But when I try to put a variable in the code it returns an error. The following text shows what I tried so far and everyone here is the error code returned.

    Example 1

    SELECT APEX_ITEM.SELECT_LIST_FROM_QUERY(12,NULL,'select display, return from dbv_team_list order by (case return when :P19_USERNAME then 0 else 1 end) asc') "Name"
      FROM DUAL
    
    
    
    
    
    

    error report:

    ORA-06550: line 1, column 152:

    PL/SQL: ORA-00932: inconsistent data types: expected NUMBER obtained TANK

    ORA-06550: line 1, column 7:

    PL/SQL: SQL statement ignored

    Example 2

    SELECT APEX_ITEM.SELECT_LIST_FROM_QUERY(12,NULL,'select display, return from dbv_team_list order by (case return when NV('P19_USERNAME') then 0 else 1 end) asc') "Name"
      FROM DUAL
    
    

    Failed to parse the SQL query:

    ORA-00907: lack of right parenthesis

    Could someone tell me if this is possible and how would I make the code so it's works.

    Concerning

    Ben

    Benton says:

    But when I try to put a variable in the code it returns an error. The following text shows what I tried so far and everyone here is the error code returned.

    Example 1

    1. SELECT APEX_ITEM. SELECT_LIST_FROM_QUERY (12, NULL, "Select display, return from dbv_team_list by (case back when: end P19_USERNAME of another 1 then 0) CSA '") 'name '.
    2. OF THE DOUBLE

    error report:

    ORA-06550: line 1, column 152:

    PL/SQL: ORA-00932: inconsistent data types: expected NUMBER obtained TANK

    ORA-06550: line 1, column 7:

    PL/SQL: SQL statement ignored

    APEX are "you typed": all element values are of type VARCHAR2. The SQL CASE expression requires that the original expression and comparison expressions are of the same type. Here, the original expression seems to be a NUMBER, or the comparison of the expressions must also show NUMBERS. The APEX P19_USERNAME element is a VARCHAR2, so it must be explicitly converted or accessible using the function NV:


    SELECT APEX_ITEM.SELECT_LIST_FROM_QUERY(12,NULL,'select display, return from dbv_team_list order by (case return when to_number(:P19_USERNAME) then 0 else 1 end) asc') "Name"
      FROM DUAL
    


    Example 2

    1. SELECT APEX_ITEM. SELECT_LIST_FROM_QUERY (12, NULL, "Select display, return of the order of dbv_team_list (case back when NV('P19_USERNAME') then 0 1 other end) CSA") 'name '.
    2. OF THE DOUBLE

    Failed to parse the SQL query:

    ORA-00907: lack of right parenthesis

    Quotes inside strings must be escaped by doubling them:

    SELECT APEX_ITEM.SELECT_LIST_FROM_QUERY(12,NULL,'select display, return from dbv_team_list order by (case return when NV(''P19_USERNAME'') then 0 else 1 end) asc') "Name"
      FROM DUAL;
    

    However, the best approach when dealing with strings containing code is to use the alternative quoting mechanism:

    SELECT APEX_ITEM.SELECT_LIST_FROM_QUERY(12,NULL,q'{select display, return from dbv_team_list order by (case return when NV('P19_USERNAME') then 0 else 1 end) asc}') "Name"
      FROM DUAL;
    

    Also suggest you use does not RETURN as a means of identification as it is a keyword in PL/SQL.

  • Is a foreign key MUST have a UNIQUE or PK column as a reference?

    First I tried, from what I saw Yes it must be Unique or PK. Secondly, I am pretty sure that I read somewhere where there are PK or unique. Thirdly, I checked oradocs and other pages, the thing ends, I owe an answer

    Constraint foreign key (also called a constraint referential integrity) designates a column as a foreign key and establishes a relationship between this foreign key and a primary or unique key specified, called the referenced key.


    This implies, but does not explicitly specify that it MUST be a PK or a SINGLE.


    Basically I want a simple yes/no answer just to give me some peace of mind. I don't want to waste any time, but changes to the oracle from time to time, and I'd rather have a confirmation from someone with more knowledge/experience.


    Thank you!

    Yes.

    This same document you are referencing tells you what are the rules for the creation of a foreign key.

    Data integrity

    Foreign key constraints

    Whenever two tables have one or more common columns, Oracle database can apply the relationship between the two tables with a foreign key, also called a referential integrity constraint constraint. The constraint requires that for each value in the column on which the constraint is defined, the value in the other specified that another table and column must match. An example of a referential integrity rule is that an employee may work for only one Department.

    Table 5-2 lists the terms associated with referential integrity constraints.

    Table 5-2 referential integrity constraint conditions

    Term Definition

    Foreign key

    The column or set of columns included in the constraint definition that refers to a key that is referenced. For example, the department_id column employees is a foreign key that refers to the department_id column of departments .

    Foreign keys can be described as several columns. However, a composite foreign key must refer to a primary or unique key with the same number of columns and the same types of data.

    The value of the foreign keys can be either the primary or unique key value referenced or be null. If any column of a composite foreign key is null, then the portions not null the key do not match any corresponding part of a parent key.

    Referenced key

    The unique key or the primary key of the table referenced by a foreign key. For example, the department_id column departments is the key referenced to the department_id column of employees .

    Table dependent or child

    The table containing the foreign key. This table is based on the values present in the primary or unique key referenced. For example, the employees table is a child of departments .

    Referenced or the parents table

    The table that is referenced by the foreign key of the child table. It is the key to this table reference that determines whether specific inserts or updates are allowed in the child table. For example, the departments table is a parent of employees .

    The first three terms defined in the table EXPLICITLY State references to the 'core' or 'unique' keys to the parent.

    The doc also refers to the Application Developer Guide:

    Maintaining the integrity of the data in Database Applications

    Foreign key references a primary key by default

    If the list of columns is not included in the REFERENCES option when you set a FOREIGN KEY constraint (simple or composite column), then Oracle database assumes that you want to reference the primary key of the specified table. You can also explicitly specify the columns to reference the table parent in parentheses. Oracle database checks automatically to check this list of column refers to a primary or unique to the parent table key. If it isn't, an informative error is returned.

    That the entire paragraph is as explicitly as it gets.

    No list of columns? Oracle then checks for a primary key.

    There is a list of columns? Then Oracle 'control to verify this list of column made reference to a primary or unique key'...

  • How to reference a content of columns to another in a where clause clause

    OK, so I need 2 columns of reference I joined in a data extraction.  I need to find one was to say:

    "where table_1.MFR_NM is like table_2.use_field1.
    is it still possible?

    Two columns contain the name of the PIECE, but they are of another era of data so 1 is named and the other bears the name, but it may also have the parent company in there too.  I thought that if I was able to reference it with 'LIKE' it would work.

    Any ideas?

    Thank you

    where table_1.mfr_nm like '%' || table_2.use_field1 || '%'
    

    While match data like this:

    Scott will match % cot

    Jeffery will match % Jeff

    etc.

    But don't help much in these cases:

    Bob smith will smith

    (no match)

  • How do you define a default value for APEX_ITEM. SELECT_LIST_FROM_QUERY?

    Hi all
    I have the report based on a query

    SELECT distinct apex_item.hidden (1, seq_id), c003 c004, c006, APEX_ITEM c005. SELECT_LIST_FROM_QUERY (6, c020, 'select DISTRIBUTION_NAME, DISTRIBUTION_NAME from the DISTRIBUTIONS',' style = "" ',' YES, ' default here? "," ", null, 'label'") 'BONOU,"NVL (c017, 'SPLIT'), 'Split', SEQ_ID
    OF APEX_collections
    WHERE collection_name = "ARGYLL_INVOICES."
    order of seq_id


    I would like to enter a default value in the APEX_ITEM. SELECT_LIST_FROM_QUERY. I can't make it work.

    Anyone know what I am doing wrong, or suggest an easier way?
    Thank you

    Just as a note, but you want to ensure your APEX_ITEM call is closed. The code snippet you posted isn't complete.

     APEX_ITEM.SELECT_LIST_FROM_QUERY(6,c020, 'select DISTRIBUTION_NAME, DISTRIBUTION_NAME from DISTRIBUTIONS','style="", SEQ_ID   <-- No closing )
    

    In literature - http://www.utoug.org/i/doc/api099.htm - (even if it is not necessarily the easiest to read), he gives this explanation of the syntax:

    APEX_ITEM. () SELECT_LIST_FROM_QUERY
    p_idx in NUMBERS
    p_value IN VARCHAR2 default,
    p_query IN VARCHAR2,
    p_attributes IN VARCHAR2 default,
    p_show_null IN VARCHAR2 default,
    p_null_value IN VARCHAR2 default,
    p_null_text IN VARCHAR2 default,
    p_item_id IN VARCHAR2 default,
    p_item_label IN VARCHAR2 default,
    p_show_extra IN VARCHAR2 DEFAULT)
    RETURN VARCHAR2;

    What you want to watch is p_value to set an initial value. It must come from your data, but you might want to consider doing a NVL or DECODE to replace your default.

    In this case, it would change your query to be:

    SELECT distinct apex_item.hidden(1, seq_id), c003,c004,c005, c006,
          APEX_ITEM.SELECT_LIST_FROM_QUERY(6,c020, 'select DISTRIBUTION_NAME, DISTRIBUTION_NAME from DISTRIBUTIONS','style=""),
          SEQ_ID
      FROM APEX_collections
     WHERE collection_name = 'ARGYLL_INVOICES'
    order by seq_id 
    

    If the value is always NULL, you can use the p_show_null, p_null_value and p_null_text to highlight 'by default'

    SELECT distinct apex_item.hidden(1, seq_id), c003,c004,c005, c006,
          APEX_ITEM.SELECT_LIST_FROM_QUERY(6,NVL(c020,0), 'select DISTRIBUTION_NAME, DISTRIBUTION_NAME from DISTRIBUTIONS','style="",YES, 100, 'Default'),
          SEQ_ID
      FROM APEX_collections
     WHERE collection_name = 'ARGYLL_INVOICES'
    order by seq_id 
    
  • Presentation of reference on a column variable

    Can I make presentation on a column variable reference. This column is a calculation...

    Check it hope this helps

    http://gerardnico.com/wiki/dat/OBIEE/presentation_service/obiee_url_passing_filters

  • In a table by using the Collection update of nulls

    I use collections to create a form in a table. However, I can't get the code to work. Could you please look at my logic and let me know what I am doing wrong?
    Apex version: 4.1
    1 process name: load Collection
    a. process Point: On Load - before the header
    Condition (b) process:
    i. the condition Type: PL/SQL expression
    + ii.     Expression:
     not apex_collection.collection_exists(p_collection_name => 'STAKEHOLDERS_COL')
    +
    c. code:
    if apex_collection.collection_exists('STAKEHOLDERS_COL') = TRUE then
       apex_collection.delete_collection(
             p_collection_name =>'STAKEHOLDERS_COL');
    end if;
    apex_collection.create_collection_from_query(
        p_collection_name => 'STAKEHOLDERS_COL',
        p_query => 'select id
                   , stakeholder_name
                   , stakeholder_role_id
                   , primary_contact_yn
                   , receive_notification_yn
                   , ''O'' original_flag
                   , wwv_flow_item.md5(stakeholder_name, stakeholder_role_id, 
                     primary_contact_yn, receive_notification_yn) 
                   from eba_prjv_proj_stakeholders,
       p_generate_md5 => 'YES'
    );
    * 2.     Report on the collection:
    a. query:
    select 
    apex_item.hidden(1,c001) id,
    apex_item.popupkey_from_query(2,c002,'select user_name d, user_name r from eba_prjv_app_users order by 1', 10) name,
    apex_item.select_list_from_query(4,c003,'select role_description d, id r from eba_prjv_stkhlder_roles order by role_code', 10) role,
    apex_ITEM.SELECT_LIST(5,c004,'N','Yes;Y,No;N') primary_contact_yn,
    apex_ITEM.SELECT_LIST(6,c005,'N','Yes;Y,No;N') receive_notifications_yn,
    apex_item.hidden(7, c006) status,
    apex_item.checkbox(8, seq_id) chkbx,
    apex_item.hidden(9, seq_id) seq_id
    from apex_collections
    where collection_name = 'STAKEHOLDERS_COL'
    AND c006 IN ('O','N','U')
    * 3.     I have a button 'Add a line' add a blank line for inserts. The button "submit page" REQUEST As "ADD". *
    * 4.     The process of adding new line: *.
    a. process Point: after submit - by the calculation and Validation
    b. process of Condition: what key - add row
    c. code:
    begin
    apex_collection.add_member(
    p_collection_name => 'STAKEHOLDERS_COL',
    p_c006 => 'N',
    p_generate_md5 => 'YES' );
    end;
    * 5. I have a button Delete who submits the request page = 'DELETE '. *
    * 6.     Collection update process:
    a. process Point: after submit - by the calculation and Validation
    + b.     Condition of process:
    REQUEST != 'ADD'
    +
    c. code:
    DECLARE
    l_status VARCHAR2(1);
    l_seq_id NUMBER;
    l_original_md5 VARCHAR2(4000);
    l_array_md5 VARCHAR2(4000);
    
    BEGIN
    
    FOR i IN 1..apex_application.g_f01.count LOOP
    
    -- Check previous status of Collection Member
      
       SELECT c006, c007 INTO l_status, l_original_md5
       FROM apex_collections
       WHERE 
       collection_name = 'STAKEHOLDERS_COL'
       AND seq_id = apex_application.g_f09(i);
    
    IF l_status = 'N' THEN
       l_status := 'N';
       
    ELSE
       SELECT wwv_flow_item.md5(apex_application.g_f02(i)
       , apex_application.g_f04(i)
       , apex_application.g_f05(i)
       , apex_application.g_f06(i))
       INTO l_array_md5
       FROM DUAL;
       
       IF l_original_md5 != l_array_md5 THEN
          l_status := 'U';
       END IF;
    END IF;
    
    
    IF l_status IN ('N','U') THEN
       
       apex_collection.update_member(
       p_collection_name => 'STAKEHOLDERS_COL'
       , p_seq => apex_application.g_f09(i)
       , p_c001 => apex_application.g_f01(i)
       , p_c002 => apex_application.g_f02(i)
       , p_c003 => apex_application.g_f04(i)
       , p_c004 => apex_application.g_f05(i)
       , p_c005 => apex_application.g_f06(i)
       , p_c006 => l_status
       , p_c007 => l_original_md5
     );
    END IF;
    END LOOP;
    IF :REQUEST = 'DELETE' THEN
       FOR i IN 1..apex_application.g_f08.count LOOP
       -- Check previous status of Collection Member
     
      SELECT seq_id, c006 INTO l_seq_id, l_status
      FROM apex_collections
      WHERE collection_name = 'STAKEHOLDERS_COL'
      AND seq_id = apex_application.g_f08(i);
    
      IF l_status = 'N' THEN
         apex_collection.delete_member(
         p_collection_name => 'STAKEHOLDERS_COL'
         , p_seq => l_seq_id
        );
      ELSE
        apex_collection.update_member_attribute(
        p_collection_name => 'STAKEHOLDERS_COL'
        , p_seq => l_seq_id
        , p_attr_number => '6'
        , p_attr_value => 'D'
       );
      END IF;
     END LOOP;
    END IF;
    
    end;
    * 7.     Update the collection table
    a. process Point: present - according to calculation and Validation
    b. process of Condition: If the key (APPLY_CHANGES)
    c. code
    DECLARE
    l_table_md5 VARCHAR2(4000);
    l_collection_md5 VARCHAR2(4000);
    BEGIN
    
    FOR c1 IN (SELECT c001, c002, c003, c004, c005, c006, c007,seq_id
    FROM apex_collections
    WHERE collection_name = 'STAKEHOLDERS_COL'
    ) LOOP
    
    IF c1.c006 = 'N' THEN
       insert into eba_prjv_proj_stakeholders
                ( STAKEHOLDER_NAME,
                 STAKEHOLDER_ROLE_ID,
                 PRIMARY_CONTACT_YN,
                 RECEIVE_NOTIFICATION_YN
                 )
                values
                (c1.c002,
                 c1.c003,
                 c1.c004,
                 c1.c005            
                );
    ELSIF c1.c006 = 'D' THEN
       DELETE FROM eba_prjv_proj_stakeholders
       WHERE id = c1.c001;
    ELSIF c1.c006 = 'U' THEN
       -- Check the record hasn't been updated since the query
       -- Get MD5 checksum from the Table
      
     SELECT wwv_flow_item.md5(STAKEHOLDER_NAME, STAKEHOLDER_ROLE_ID, PRIMARY_CONTACT_YN, RECEIVE_NOTIFICATION_YN)
       INTO l_table_md5
       FROM eba_prjv_proj_stakeholders
       WHERE id = c1.c001;
       -- Compare the checksum values and if they are different, raise an error.
       IF l_table_md5 != c1.c007 THEN
          raise_application_error( -20001
          , 'Current version of data in database has changed '||
            'since user initiated update process.');
         return;
      END IF;
    
      UPDATE eba_prjv_proj_stakeholders set
      STAKEHOLDER_NAME = c1.c002,
      STAKEHOLDER_ROLE_ID = c1.c003,
      PRIMARY_CONTACT_YN = c1.c004,
      RECEIVE_NOTIFICATION_YN = c1.c005
      where id = c1.c001;
    end if;
    end loop;
    apex_collection.delete_collection( p_collection_name => 'STAKEHOLDERS_COL' );
    END;
    At the end of the process, I see null values inserted in my table. The report also displays null values.

    Published by: jaouad khalifi on August 17, 2012 04:26

    Published by: jaouad khalifi on August 17, 2012 04:42

    Published by: jaouad khalifi on August 17, 2012 04:46

    Published by: jaouad khalifi on August 18, 2012 02:03

    Hello

    I changed and then brought back to the State that you had.

    The problem here is that you have status and Seq_id returned with APEX_ITEM. HIDDEN, but you have not selected the Show check box for those columns attribute report tab.

    Thus there is no f06 and f09 only named elements in your HTML DOM and therefore no APEX_APPLICATION. G_F06 and G_F09. If your processes

    FOR correct here is what you do

    1. mark the status and Seq_id as indicated in the report attribute tab columns
    2. change the ACE status display hidden to report column Standard. Change display of the Seq_id also report Standard column

    Note that when a column is not marked to show in the report he becomes any and you don't see the associated items in the DOM HTML.

    See you soon,.

  • Classic report with column LOV

    I have simple classic report (Apex 4.2.4) with two columns. One is to main table and shows the ID; another column is LOV that contains detail table names, which must FK main table.

    Table structure:

    master_table (id NUMBER);

    detail_table (detail_name VARCHAR2 (50), master_id NUMBER);

    Source report looks like:

    Select

    ID,

    lov_column null

    of master_table;

    lov_column is defined as a query in function LOV and query looks like:

    Select detail_name from detail_table

    where master_id = #ID #.

    But the application does not recognize the values #ID #? Can I use it without the WHERE statement, but in this case in LOV, I got all the records, and that I want in a folder have values only for this ID.

    What can I do?

    Thanks in advance.

    Kiran I thank you for your care, I finally found the solution.

    Apex.Oracle.com cloud works with Apex5, it is not possible to obtain a classical column LOV relation, but it is possible to do this by using APEX_ITEM. SELECT_LIST_FROM_QUERY. And so I did in my application.

    in the statement I wrote:

    Select

    Mt.ID,

    apex_item.select_list_from_query (1, null, "select dt.detail_code d, dt.detail_code r detail_table dt where dt.master_id = ' |") Mt.ID) retail

    of master_table TM;

    And it works!

  • Absolute cell to the cell range reference

    I would like to refer to a range of cells on one worksheet to another, all in the same worksheet.  When shoves and columns are changed on the source worksheet, I would like the second sheet to reflect this change, so I think that I need the absolute references.  I know I can do this for a single cell by making reference to the cell, by clicking on the arrow and horizontal and vertical locking.  Is it possible to do it for a range of cells?

    Thanks for your help.

    Hi GB,

    In the example, copy table cells reference the same cell in the Source, using the INDEX table.

    The formula entered in B2 is the following:

    B2: = INDEX (Source: $A:B,ROW(),COLUMN()))

    That the form is completed on the columns, the reference to a column remains the same, and the column reference b change to match the column containing this iteration of the formula.

    The reference by specifying only the columns where a range is average planned is in all cells in the column.

    Complete the form on the left to A2, then fill both down to line 3.

    Add rows or columns in the Source table and filling the new cells of data has no effect on the copy table.

    The copy table should be expanded using the column and handles command line at the top right and bottom left of the table, or the control handle of lines and columns in the lower right corner (visible on the first image of th, where a single table is selected)

    As the rows and columns are added, numbers automatically fills the formula into the new rows or columns.

    If the copy table is extended beyond the size of the Source table, 'extra' columns or lines contains an error of "bad reference."

    Add lines to the source table removes the error in previously 'extra' copy lines, because there the range, specified as the "entire column" automatically sees the lines added.

    The column added, however, must be removed from the copy, and then added to copy the formula without error in column C in column D.

    Kind regards

    Barry

  • Column Expression HTML links

    OK, so I followed some instructions that fac586 left in an answer (via link) for another question (Presentation of the State - side by side data sets), and I need help in a particular area:

    If my model 1 attribute in my custom report template looks like this...:

    < li >

    < a href = "" #DERIVED$ 01 # "title =" #ENAME #">"

    #PHOTO #.

    < span > #ENAME # </span >

    < /a >

    < /li >

    ... And my SQL query for the report looks like this:

    SELECT

    LAST_NAME,

    ' < img src = "p? n ='|| NVL(IM.ID,0) | "" height = width = 150px auto > ' IMG '.

    FROM EMPTABLE, WWV_FLOW_FILE_OBJECTS$ IM

    WHERE EMPID = SUBSTR (IM. NAME OF FILE, 1, 6)

    What is my expression of HTML to connect #ENAME # and #LAST_NAME # and #PHOTO # and #IMG # supposed to look like.  I tried the googles but in vain.

    In fact, my question is: what is the syntax for creating a derived column URL link in the attribute of expression HTML?

    AquaNX4 wrote:

    OK, so I followed some instructions that fac586 left in an answer (via link) for another question (Presentation of the State - side by side data sets), and I need help in a particular area:

    If my model 1 attribute in my custom report template looks like this...:

  • #PHOTO #.

    #ENAME #.

  • How is the derived column defined?

    ... And my SQL query for the report looks like this:

    SELECT

    LAST_NAME,

    '' IMG

    FROM EMPTABLE, WWV_FLOW_FILE_OBJECTS$ IM

    WHERE EMPID = SUBSTR (IM. NAME OF FILE, 1, 6)

    What is my expression of HTML to connect #ENAME # and #LAST_NAME # and #PHOTO # and #IMG # supposed to look like.  I tried the googles but in vain.

    In fact, my question is: what is the syntax for creating a derived column URL link in the attribute of HTML expression?

    Some things to note:

    • The main reason using custom templates, derivatives and Expressions HTML columns is to separate concerns, so that SQL and HTML are not mixed in the access layer data. Your code does not properly separate layers of access and the data structure. In the example, the element/source of the image is generated using declarative BLOB support (which is strongly recommended for all downloads of image). If it is not using this method, then put the HTML code required in the model, to recover the source of the image (and all the other required attributes) as discrete columns and reference them individually in the model using the column substitution syntax.
    • The height and width attributes are disabled, incorrectly specified using CSS syntax. The height and width HTML attributes are specified in pixels, with no units. The CSS dimensions are specified using the attribute of syle and units must be included in digital dimensions are used.
    • The alt attribute is required for the img elements.
    • Don't use undocumented objects (WWV_FLOW_FILE_OBJECTS$). A vision documented and supported (APEX_APPLICATION_FILES) is provided.
    • The source of the image that is used will not work.

    Suggest you reproduce the problem in an example on apex.oracle.com and view identification information of developer comments for the workspace.

Maybe you are looking for

  • Satellite C670D-109 - installation of recovery after replacing HARD drive image

    Hello I have a problem to restore my laptop.My hard drive is not working, I do not have the recovery disks, but I managed to save the HDD Recovery folder in a partition of DATA. Once installed the new hard drive, it is possible to recover my original

  • M7640n acpi driver missing Media Center

    Hi, I'm helping a friend with his media center m7640n.  I had to wipe his record clean b/c of the viral infection.  I did not have the chance to create the recovery CD I got all drivers installed ok except that now I have an unknown device in device

  • Windows Live ID: Account blocked - cannot access even after a successful password change

    Hello A few weeks ago, when I tried to log in My Windows Live Hotmail, this message appeared: "your account has been blocked." I recall my password and secret answer to the question. When I tried to reset my password, using the secret question, I was

  • Aspire T180 won't start and makes a beep sound

    My Aspire T180 not boot at all and makes a beep sound. The monitor doesn't wake up. The sound signal is a long beep followed of two short beeps - all in about one second of 1 1/2 to 2 life. My nephew has recently completed a 2-year computer program.

  • Rv110w IPSec Site-to-Site

    I'm trying to get a site to site VPN working between two routers RV110W, obviously in different places with different public IPs and different internal addressed IP networks. For some reason, the IPsec Security Association gets 'established', but no