Populating local page items with Application Process onload

I called a page passing a parameter to that. On loading of that page, I executed an application process that will fetch some data from table based on the on the input parameter to that page. The fetched data should now get displayed on the local page.
The above is my requirement. I designed accordingly. The application process could able to fetch the data. But it is not displaying in the local page item
Here is the content of the application process
SELECT vun_catalog_type
INTO :p46_catalog_type
FROM eeb_unit_reels unit_reels
, eeb_valid_units units
WHERE unit_reels.ure_vun_id = units.vun_id
AND unit_reels.ure_id = :p46_ure_id;
Scratching my head !!!!!!!!!!!!
Thanks
Deb

Deb,
This might work. Establish a Page Process is of Type PL/SQL Anonymous Block.
Process Point = On Load - Before Header
Run Process = Once Per Page Visit(default)
Source/Process
DECLARE
   c_catalog_type   VARCHAR2( 10 );
BEGIN
   SELECT vun_catalog_type
   INTO   c_catalog_type
   FROM   eeb_unit_reels unit_reels, eeb_valid_units units
   WHERE  unit_reels.ure_vun_id = units.vun_id
          AND unit_reels.ure_id = :p46_ure_id;
   apex_util.set_session_state( 'P46_CATALOG_TYPE', c_catalog_type );
END;Jeff

Similar Messages

  • Multi-Select Page Item in Application Item

    I have a multi-select page item that I need to copy to an Application Item (for AJAX select). I have a js function that does the following:
    get.add('REFRESH_LOV_FK_SCHOOL',pSchool.value);
    It only seems to copy the first value (before the ':') of the multi-select list to the application item. I verified this with the session state of both the page items and application item. Is there a reason it only copies the first value?

    Bob
    In your JS function you have declared the formal parameters as pSchool,pYear,pApp. However the code in the function references 'PSelect' I shall assume that you meant 'PSchool' <script>
    function get_select_list_xml1(pSchool,pYear,pApp){
    var l_Return = null;
    var l_Select = html_GetElement(pSchool);
    var schoolVal=$f_SelectValue(pSchool.id);
    alert ('values=' + schoolVal);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=' + pApp,0);
    get.add('REFRESH_LOV_FK_SCHOOL',schoolVal);
    get.add('REFRESH_LOV_YEAR',pYear.value);
    gReturn = get.get('XML');
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    </script>

  • Aplication Vs. Page level items for application process

    Hi,
    I have many application processes in my applications, many of them take parameters.
    Right now I am passing parameters using page level temporary items. This is causing each page to have many items that are only used for calling the application process.
    Is it better to use application level items for this purpose?
    any pros and cons for each of these?
    ~Ketan

    Arie,
    Are you saying that the condition only apply to rendering the item, but the APEX engine will still consider such an item a valid “internal” variable?
    Yes. The absence of a condition on a page item or a condition that evaluates to true simply allows it to be rendered on the page. The existence of the item in the page definition allows it to hold session state.
    We're planning to introduce a non-displaying page item type just for this purpose, sort of a scratchpad variable with no display properties, like an applicaition item but defined on a page.
    Scott

  • Pass value through URL without setting local page item

    Folks,
    I have a table where I have created a dummy column with a hyperlink on it to go to another page in the application which runs a report passing through columns on the table
    As I am doing this several times (for different pages in my application) - Is there a way of passing a variable through a URL to a report without setting a local variable
    i.e.
    Click Here
    Here I am assigning a local variable on Page 25 which is hidden called P25_TEST1
    What I would like to do is pass the value straight to page 25 (which runs the report) without the need to create hidden items on the report pages all the while
    Thanks
    Gareth

    You have a plain HTML page that loads with a url with something like ?field=value
    And you want "value" to show on your page, correct?
    <html>
    <body>
    <script>
    var qsParm = new Array();
    function qs() {
    var query = window.location.search.substring(1);
    var parms = query.split('&');
    for (var i=0; i<parms.length; i++) {
       var pos = parms<i>.indexOf('=');
       if (pos > 0) {
          var key = parms<i>.substring(0,pos);
          var val = parms<i>.substring(pos+1);
          qsParm[key] = val;
    qsParm['field'] = null;
    qs();
    if (qsParm['field'])
         document.write('You selected ' + qsParm['field'] );
    </script> 
    </body>
    </html>
    Call that as test.html?field=Hello
    Here's a nice link that explains it in detail: http://www.eggheadcafe.com/articles/20020107.asp

  • Creating pages,item WITH approval.

    Hi,
    I found out how to create a page and add an item to that page automatically. But now I need to find out how to use this with approval.
    1) I noticed that approval only exists on the item level and not the page level. Is this correct?
    2) How can I make that the page/item I create automatically, has to be approved? The approval will be done in a normal way, through the existing approval portlet. Normally one should enable approval control on the page, create a user and give this user the 'manage items with approval' rights, all items published by this user, will not be published before approval.
    Can someone provide an example, on how to mark an item for approval programmatically?
    The function add_item contains a parameter 'p_author - Author of the item.'. Can this be used, as I enable the author to 'manage items with approval'?
    Cheers
    B.
    Message was edited by:
    Ratjeuh

    Even If I bypass the public user problem and do the following:
    -- create new page
        l_new_page_id := wwsbr_api.add_folder(  p_caid             => l_caid,
                                                p_name             => l_uppertext,
                                                p_display_name     => l_text,
                                                p_type_id          => wwsbr_api.FOLDER_TYPE_CONTAINER,
                                                p_type_caid        => wwsbr_api.SHARED_OBJECTS
        -- Process cache invalidation messages.
        wwpro_api_invalidation.execute_cache_invalidation;
        portal.wwctx_api_private.set_context( p_user_name => 'NEEDAPP', p_password => 'dummy');
        -- create new item
        l_text_item := 'This is a new item on the new page';
        l_new_item_master_id := wwsbr_api.add_item( p_caid              =>  l_caid,
                                                    p_folder_id         => l_new_page_id,
                                                    p_display_name      => 'This is the display name',
                                                    p_type_id           => wwsbr_api.ITEM_TYPE_TEXT,
                                                    p_type_caid         => wwsbr_api.SHARED_OBJECTS,
                                                    p_region_id         => 0,
                                                    p_text              => l_text_item
        -- Process cache invalidation messages.
        wwpro_api_invalidation.execute_cache_invalidation;
        wwctx_api.clear_context;
        owa_util.redirect_url(curl => l_back_url || '&' || l_reference_path || '.p_text=' || l_text);So, I change the context in my code to make sure that the item is created by the user NEEDAPP. This works, the page is created first (by the user who invoked the portlet) and an item is placed on the page. I can even see the item showing up in my 'PENDING ITEMS LIST' for approval.
    BUT
    After the procedure I am NOT redirected to the page where I submitted the form bu instead I get an error:
    Fout: De listener heeft het volgende bericht geretourneerd: 503 Service Unavailable
    What is the problem?

  • How to group Page Items with fieldset and legend HTML tags ?

    I have 7 Page Items (i.e. select list, input text....) defined in Side Bar Region of my Page Zero,
    for clarity I would like to group these items as follows:
    1) <fieldset>
    <legend>Costs</legend>
    <input ..... item1 >
    <input .... item2 >
    <input..... item3 >
    </fieldset>
    1) <fieldset>
    <legend>Technical Attributes</legend>
    <input ..... item4 >
    <input .... item5 >
    <input..... item6 >
    <input..... item7 >
    </fieldset>
    I appreciate if you can tip me  with  a URL link or codes examples i.e. javascript, Side Bar template #BODY# customization.
    Thanks for your tips.

    What if you need to access more than one data source?
              <sql:query var="myQuery" dataSource="myDataSource">
              </sql:query>
              <sql:query var="myOtherQuery" dataSource="myOtherDataSource">
              </sql:query>
              If you specify one data source as the default, how do you access the other
              one?
              -- Craig
              "thanh nguyen" <[email protected]> wrote in message
              news:3fa18529$[email protected]..
              > I believe you can set up a default datasource for the application context
              in the web.xml and weblogic.xml. That way, on your JSP, you will not need to
              set the datasource. The connection pool will handle all of that for you.
              >
              > 1. modified weblogic.xml
              > <reference-descriptor>
              > <resource-description>
              > <res-ref-name>jdbc/hr</res-ref-name>
              > <jndi-name>jdbc/hr</jndi-name>
              > </resource-description>
              > </reference-descriptor>
              > 2. modified web.xml
              > <context-param>
              > <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
              > <param-value>jdbc/hr</param-value>
              > </context-param>
              >
              > <resource-ref>
              > <res-ref-name>jdbc/hr</res-ref-name>
              > <res-type>javax.sql.DataSource</res-type>
              > <res-auth>CONTAINER</res-auth>
              > </resource-ref>
              > 3. redeploy app
              

  • Page Item with Date format DD-MON-RR - APEX 32

    Hello,
    I am passing date parameter but somehow it is not formatting date properly on calendars.
    For e.g.
    Below is my calendar query
    select distinct count(*) knt, initcap(username) username, to_date(to_char(trunc(timestamp),'DD-MON-RR'),'DD-MON-RR') ts from xrx_master_records
    group by initcap(username), trunc(timestamp)In above query TS is the date column that results in DD-MON-RR format.
    Then I format column on calendar tab as shown below, here is how I am constructing the link.
    <!-- <a href="f?p=&APP_ID.:40:&APP_SESSION.::NO::P40_CAL:#USERNAME#:P40_DAILY_DATE:#TS#"
    style="color:NavyBlue;
    font-weight:bold">#USERNAME#(#KNT#) </a> -->But the issue is - #TS# field shows complete date with time stamp for page item P40_DAILY_DATE. i.e. instead of 21-JUL-10, it shows 21-JUL-2010 12:00:00 AM. That means, it is ignoring calendar query and reads straight from database.
    How can I make sure that P40_DAILY_DATE item receives date in DD-MON-RR format?
    Then, I plan to use P40_DAILY_DATE to connect with the report region by comparing timestamp column from same table with P40_DAILY_DATE.
    Please advice.
    Thanks,
    R

    Sorry but, I am expecting a more productive feedback than this.
    Let me state the obvious that, this forum is the community of SME who are volunteers. It is the precious help they provide with their insight to questions other members have. Due to the simple fact that it is purely a matter of choice whether to reply questions or not, it is perfectly justified that some of questions remain unanswered. I hope you understand this.
    And anyway, what makes you think that those question that remain unanswered on this forum, remain open forever?

  • BUG?: Paginate Doesn't Work with Page Item with Source as Database Column

    CREATE TABLE T_PARENT
      ID NUMBER NOT NULL
    , STAFFID VARCHAR2(20)
    , CONSTRAINT PARENT_PK PRIMARY KEY
        ID
      ENABLE
    insert into T_parent values (1, '77258317');
    commit;
    create table T_child as
    select
      rownum id
    , '77258317' staffid
    , dbms_random.string('U', 5) aa
    , dbms_random.string('U', 15) ab
    , dbms_random.string('U', 3) ac
    from dual
    connect by level <= 100;
    /Form page for T_PARENT.
    Classic report:
    select id, aa, ab, ac
    from t_child
    where staffid = :Px_STAFFIDTry and paginate = no data found.
    However, if you first submit the page, then paginate, it works as expected.
    Reproduced:
    http://apex.oracle.com/pls/apex/f?p=54920:57:106342795192226::::P57_ID:1
    If I for e.g. use an item with static assignment, it works fine.
    Cheers,
    Trent
    Edited by: trent on Apr 19, 2013 11:59 AM
    Also, it works fine when you reference the PK column.

    Just like with the paginate, the problem may also happens when you change the sort column or direction by clicking on the header.
    If the item in the WHERE clause was being set fromt he URL this wouldn't be an issue because it would be saved on the Persisten Session state.
    Regarding session state, there are two kinds Temporary or in memory and Persistent. When the page is rendering the item values are only on the Temporary session state. This is why the report renders correctly on page load.
    The item value won't go to Persistent session state until the page is submitted. Item values also go to Persistent session when they are passed in the URL, or explicitly set with a computation, etc..
    The Session state Dialog can only show the Persisten session state which is saved in DB tables. It's unable to show you the values during page render. For that you need other mechanisms like debug messages.
    I think that when you set page item as SQL query and Only when current value session state is null the value must be saved to Persistent session state. If you can examine the value with the Session Dialog then that would confirm that.
    Hope this helps.
    Thanks
    -Jorge

  • Unexpected Result with Application Process

    Hi Everyone,
    I have an application process which is producing unexpected results. The code is below. What does is, updates one table, then based on that update inserts some data into a different table. The process workes fine. However, when the table gets updated it updates by 2 when it should only update by 1. Does anyone see where i am going wrong?
    Its really anoying lol
    Thanks in Advance
    -N.S.N.O.
    Code*
    BEGIN
    update pzrckt01 set CLK_NEXT_NR = CLK_NEXT_NR+1 where CLK_PARTITION_ID='QWC';
    htp.p('Start debugging');
    htp.p('QWC_KEY_ID : ' ||wwv_flow.g_x02);
    htp.p('SYS_ID : ' ||wwv_flow.g_x03);
    htp.p('QWC_DELETE_CD: ' ||wwv_flow.g_x04);
    htp.p('QWC_CUS_ID : ' ||wwv_flow.g_x05);
    htp.p('COU_ID_QWC : ' ||wwv_flow.g_x06);
    insert into PZRCUT01 (QWC_MYTNT_ID,QWC_KEY_ID,SYS_ID,QWC_DELETE_CD,QWC_ADD_TD,QWC_ADD_USER_ID,QWC_UPDT_TD,QWC_UPDT_USER_ID,QWC_SOFTLOCK_TS,QWC_CUS_ID,COU_ID_QWC) values ((select clk_next_nr from pzrckt01 where CLK_PARTITION_ID ='QWC'),wwv_flow.g_x02,wwv_flow.g_x03,wwv_flow.g_x04,(select sysdate from dual),(select :APP_USER from dual),(select sysdate from dual),(select :APP_USER from dual),(select systimestamp from dual),wwv_flow.g_x05,wwv_flow.g_x06);
    EXCEPTION WHEN OTHERS THEN
    htp.p('Exception');
    htp.p(SQLERRM);
    END;

    Hey,
    There are no triggers on these tables im working with. A way to get around waht im tryin to do is have 2 application processes, one for the update and one for the insert. but to do this i would need them to be fired off using the same button.
    for example in my HTML Header having a function within a function.
    function pzrcut01Insert(){
    function pzrckt01Update(){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=update_pzrckt01',null);
    var ajaxRequest1 = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=PZRCUT01_INSERT',null);
    ajaxRequest1.addParam('x02', $v('P6_QWC_KEY_ID'));
    ajaxRequest1.addParam('x03', $v('P6_SYS_ID'));
    ajaxRequest1.addParam('x04', $v('P6_QWC_DELETE_CD'));
    ajaxRequest1.addParam('x05', $v('P6_QWC_CUS_ID'));
    ajaxRequest1.addParam('x06', $v('P6_COU_ID_QWC'));
    var Answer = confirm('Are you sure you want to update?');
    if (Answer) {
    gReturn=ajaxRequest1.get();
    if (gReturn) {
    alert(gReturn);
    ajaxRequest1.get();
    alert('Attempted Insert Processed');
    }else{
    alert('Attempted Insert Cancelled');
    would this be possible?
    -N.S.N.O.

  • Referencing a page item with query results from another page

    Hello Gurus,
    Any Idea How to achieve following in APEX.
    Step 1: Page 1, Region A of type SQL report.
    Sql query:
    select employee from emp;Step 2: Page 2, A display item is created on this page, say :P2_X that is intended to source its values from the query/region written in Page1.
    In this example stated above, I need to display :P2_X on PAGE 2 that in receives value from employee column on the query mentioned in step 1.
    Any idea how to achieve this?
    Thank you for reading this post.
    -R

    Hello Rich,
    Edit your SQL Report.
    Under Column Attributes , edit the EMPLOYEE Column.
    Go to LINK Tab.
    In link text : select the first option #EMPLOYEE#
    In Target is - select Page in this application.
    in item type P1_X and in value enter #EMPLOYEE#
    Regards,
    Shijesh

  • Mark T/R items with the 'Processed' Indicator in batches

    Hi, guys,
    I need to mark a great bulk of transfer request(non or partial processed items) with 'Processed' Indicator, is there any way can get it done in batches? Thanks...
    Best regards
    Michael

    No mass transaction exists for this purpose...try trx LL01...or LSMW...
    Edited by: Csaba Szommer on May 18, 2009 2:38 PM

  • Populating Multiple Page PDF with FDF

    Hi -
    We have a need to populate a multiple page PDF (i.e., 40 fields across two distinct pages) with a FDF that we are creating in a separate scripting language (basically we are taking a user populated spreadsheet and want to populate the thousands of iterations of forms from it).
    We are using Adobe Acrobat X and it works if we split the PDF into separate PDF files by page and do the same with the FDF...but can't seem to get it to work with using a single multiple page PDF and a single FDF.
    We validated that each field has its own distinct name.
    This is our first forray into working with PDFs...
    Any thoughts?
    Jason

    It's hard to say what's wrong without look at the PDF and the FDF. How many pages are in the PDF and how many total fields are in it?

  • How to set the value of application item using pl/sql in application process

    Hi guys,
    I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of application item in application process. Also i want to know in which type of application process should i use to set the value of application item when a user starts a session. The value of application item varies from user to user.
    Please help.
    I am using apex 4.2
    Regards,
    Waqas

    You can use the application item as bind-variable with its name. ie. your application item is named G_MY_APPLICATION_ITEM, then you can access/set it using :G_MY_APPLICATION_ITEM.
    For example
    BEGIN
        -- assign like a variable
        :G_MY_APPLICATION_ITEM := 'LARRY';
        -- use in a SQL statement
        SELECT WHATEVER_COLUMN
          INTO :G_MY_APPLICATION_ITEM
          FROM MY_TABLE
         WHERE USERNAME = :APP_USER
    END;
    Peter

  • Populate LOV in an Application process

    Hi,
    I have a requirement of populating the LOV on click of a button.
    how do i do that?
    is it possible to populate a LOV in an application process?
    Thanks,
    Krishna

    I am still having trouble understanding your description.
    i have a drop down where the source is a LOV
    Please try to use APEX terminology.
    You have an APEX page item with a display-as set to Select List, perhaps?
    The LOV attribute is a SQL query?
    But the dropdown the fetches the values from LOV and displays whenever i submit a page
    I don't know what means. A page is rendered, you interact with the form and you use a button to submit the page for processing. "displays whenever I submit a page" doesn't make sense to me.
    Tell you what, try to put up some screenshots on tinypic.com, create a small example on apex.oracle.com, something to help us understand your situation.

  • Dynamic alignment of report column and page item value

    Hi friends,
    I have an interactive report which contains the columns like
    <li>empno
    <li>Name
    In the above i have "empno" with a column alignment of left and a "Name" with a column alignment of left.
    Whether it is possible to override the data alignment that we set in the report according to the value of the application item like
    If my application item value is US, then i need the column alignment of both the column"empno" and "Name" to be left and if my application item value is AR, then i need the column alignment of both the column "empno" and "Name" to be right. Whether is it possible to achieve the dynamic alignment to the report data of both the columns "empno" and "Name" according to the application page item value.
    And also in the case of page item i have a page item with a name P1_NAME in which it has a Element Horizontal/Vertical alignment to left.
    I need that element alignment of the page item to behave dynamically according to the application page item, like if the application page item is US then the element alignment of the page item has to be left and if the application page item is AR then the element alignment of the page item has to be right.
    Whether is it possible to achieve my above two scenario's friends. Kindly help me with this.
    Thanks in advance.
    Brgds,
    Mini

    Kees,
    Your approach is excellent and brilliant:-)
    I tried with your steps and i can achieve those alignment in both ways like you said(either on page load/through DA).
    But im going with the DA way. I have certain query regarding this kees.
    <li>Suppose if the report, is classic whether i can go with the same approach that i have achieved alignment with the IR report.
    <li>Currently through the DA way, i used the page item in the condition. Is it possible to use the application item instead of page item in DA. Because im going to use the application item FSP_LANGUAGE_PREFERENCE for getting the code either 'AR' or 'US'.
    <li>Finally i need this kind of restriction for the page item also, consider like i have a page item P1_X with an Element Vertical/Horizontal alignment as left. Now i need to change that alignment to right according to the application page item value, hence i can give application item condition for the page item like below
    PL-SQL EXPRESSION: :FSP_LANGUAGE_PREFERENCE = 'AR'
    i need the element alignment of the page item to behave dynamically suppose if the application item value is AR then the element alignment of that page item has to be right if the application item value is US then the element alignment of that page item has to be left, irrespective of the page item Element Vertical/Horizontal alignment that was set to it.
    Thanks for your kind help
    Brgds,
    Mini

Maybe you are looking for