Apex 5 - pl/sql, before the process of the header

Hi all

I have a PL/SQL process before header which read a table (with a key of the application element) and many elements of the page linked to the (authorized) db with a procedure in a package.

In version 4.2, I could use page elements related to the column of the source table ' only when null... ", to place this items with PL/SQL, before that process the header and then submit them to update the db.

Now in version 5, db binded items must have source "Always, replacing everything..", so how can I set this value points at a meeting with the process of pl/sql?

I tried with the apex_util.set_session_state, but it does not work.

Is there a way to do this without the need for dynamic action?

Thanks in advance for your suggestions.

Robi

Hi Robi,

Robi says:

I have a PL/SQL process before header which read a table (with a key of the application element) and many elements of the page linked to the (authorized) db with a procedure in a package.

Do you mean 'Automated line Fetch' process usually generated in the type wizard forms?

In version 4.2, I could use page elements related to the column of the source table ' only when null... ", to place this items with PL/SQL, before that process the header and then submit them to update the db.

Now in version 5, db binded items must have source "Always, replacing everything..", so how can I set this value points at a meeting with the process of pl/sql?

I tried with the apex_util.set_session_state, but it does not work.

Yes. It is newly introduced in Oracle APEX 5.0 forced a Page mapped to the DB column element should have used Source as "Always, replace the value that exists in the session state.

You can change the Compatibility Mode of the APEX Application 4.2 to substitute the constraint.

Reference: base Oracle: APEX 5 Source - attribute tolerates less mistakes

Is there a way to do this without the need for dynamic action?

If you want to stick to Oracle APEX 5.0 (and not to change the Compatibility Mode), then dynamic actions is the rest of the solution.

Kind regards

Kiran

Tags: Database

Similar Questions

  • "before the header" process and page elements

    I want a process running in 'On Load before the header' page X see an element value them was introduced to her page Y.
    How this can be done?

    The element on page X will have its value before executing the process "before head". You can see if your page in "debug" mode.i

    CITY

  • Before the header

    Hello

    I have a page that is supposed to be doing some work and then redirect to another, it is because this page should take arguments through the URL (HTML link is used, not a form submission to pass arguments) and avoid the pressure of the user refresh and repeating the action I want to create a page that does the job and then redirects to the page of the user clicks on the link with some action (for example. ("Delete row" in a tabular presentation).

    Now for my problem, which seemed perfect for this is a header and branch process. In the process I get the job done and then in the direction of redirect to the page. But unfortunately, APEX is not what I want, if there is no branch that processes are running but with a branch, the processes are ignored. Don't you think that it is a bug in APEX? The use of a branch "before the header" decreases a lot when you can run any process "before the header" before the branch is made, is not it? At least it is unexpected and does not seem logical, I want to redirect without making the process you could always solve that with conditions, in this way the problem is unsolvable using built-in apex mechanism and I have to resort to the use of Javascript to redirect the page (and how you even include process using the Javascript redirect success message?)

    So, in short, I am missing a more common idiom to set up a page that makes a few treatment via parameters in the URL and then performs a redirect to another page, or will be the only solution using Javascript?

    Search for suggestions or solutions, as always on this forum useful.


    PS. I can't use a form, there must be a link located in each row of the table. "Column links" could not be used because I have multiple links in the same cell in the report, so I haven't looked into them. I generate the links myself in my SQL statement using this function:

    FUNCTION CreateLink (p_page in varchar2 default p_items null, varchar2 default NULL,
    p_values in varchar2 default null, p_request in varchar2 default null)
    return varchar2
    is
    Start
    -for example. f? p = 123:4:3660195698136138:P4_PACK_NAME, P4_FUNC_NAME:PKG_FILE_NAME, GENERATE_FILE_NAME_US
    return ' f? p =' || APEX_APPLICATION. G_FLOW_ID | ':'
    || NVL (p_page, APEX_APPLICATION. G_FLOW_STEP_ID) | ':'
    || APEX_APPLICATION. G_INSTANCE | ':'
    || p_request | ':::'
    || p_items | ':'
    || p_values;
    end;

    Published by: user10858232 on January 26, 2009 03:44

    Published by: user10858232 on January 26, 2009 03:45

    Published by: user10858232 on January 26, 2009 03:46

    Hello:

    You may reach the redirection using 'owa_util.redirect_url' as in the example below

    owa_util.redirect_url('f?p=::v('SESSION')::NO:::');
    apex_applicaiton.g_unrecoverable_error=true;
    

    So do treat your 'work' a header and add the 2 statements at the end of this before that the process the header.

    CITY

  • How to insert a < script > code before the < / head > tag?

    I would like to insert a < script > code inside pages of my site, and it should be placed before the < / head > code.

    Can I handle this with muse? Otherwise, every time when I export the site in HTML, I need to open the files updated and copy and paste the SCRIPT code in the HEAD again.

    Adding scripts to the head section of your documents is not currently supported in Muse, however it is planned for future versions of Muse.

    You can add links to the scripts by using the object-> Insert HTML code, but it will be inserted at roughly the position of the element in HTML page.

  • PL/SQL conditional Progess to before the header to page 0

    Hello, all THE

    I want to run PL/SQL processes on all on the application page. based on the condition...

    Can someone help me on this

    Kind regards
    Rahul

    Hello Rahul,

    Go to the shared components / application process. There you can define when (the Point), what (PL/SQL) and the conditions for a process of PL/SQL 'global '.

    Greetings,
    Roel

    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.Logica.com/

  • redirect with notification before the header

    I have a report pages that have "edit" buttons that invite you to the URL of the page change the APEX with the important information such as primary keys. If the data changes (i.e. a record has been deleted) under the user and the user clicks on 'Edit', the user receives the message "ugly":

    ORA-01403: no data found
    < stop sign > error on line cannot.
    Ok

    It occurs due to forward the process of the row header. I could put some additional areas to inform the user and conditions to see the/run the page differently. But I expect to do is to redirect the user to the page of report and have a notification message indicating the change data and the current data.

    I have a process before the fetch line process that checks if the data is there. If the data does not exist, then owa_util.redirect_url () redirects to the page of the report. However, I was unsuccessful by displaying a notification message. I tried setting g_notification, g_print_success_message as well as to the news of success in the redirect URL. However, I was unsuccessful in creating a notification. Here is forward the process of the header:
    declare 
    cnt PLS_INTEGER;
    
    begin
    select count(*) into cnt
    from board 
    where board_id=:P220_BOARD_ID;
    
    if cnt != 1 then
      apex_application.g_notification :='Data Changed';
      owa_util.redirect_url('f?p=&APP_ID.:200:&APP_SESSION.::NO:220:::&success_msg=changed data');
      apex_application.g_unrecoverable_error:=true;
    end if;
    end;
    Any thoughts would be greatly appreciated. Thank you.
    -Carmine

    Carmine:

    You can try the following

    Create an application called g_error_msg
    In the redirect url the value g_error_msg to the value desired

    owa_util.redirect_url('f?p=&APP_ID.:200:&APP_SESSION.::NO:220::G_ERROR_MSG:changed data');
    

    Define a 'Load On - before heading' process in the report with the following code page

    apex_application.g_notification:=:g_error_msg;
    :g_error_msg := null;
    

    Make this process depends on "g_error_msg", with a value non-zero

    CITY

    Published by: city was on October 26, 2009 06:26
    Change of apex_application.g_notification_message: =: g_error_msg to apex_application.g_notification: =: g_error_msg;

  • scroll the content before the header below it and not on top

    Hello

    At my header and footer any place in this content on the homepage rode underneath

    woke up today and the content on the home page is scrolling on the header

    any thoughts on how to address them to the home page and other pages scroll in my head of sticky which is pinned at the top? \

    Thank you

    Hello

    Please try the following steps to resolve this problem.

    • A - master page open in Design view.
    • Open the layers panel and create a new layer and name as "navigation" to ensure that it at the top of the list.

    • Select the navigation elements as shown in the screenshot below.

    • Once selected, right-click on it and select "move layer".
    • Then select the top layer of most "navigation".
    • This will bring the items selected in the top of the stacking order and will solve these two issues.

    Kind regards

    Vivek

  • Passing variable from one form of the APEX to PL/SQL open the link in a new borwserwin

    Hi all

    I received a form of apex based on a query like:

    'INTERFACE_NAME ',.
    'INTERFACE_NAME' INTERFACE_NAME_DISPLAY,
    "PRIORITY."
    "HAS_STARTED,"
    "EMAIL_TO"
    'STATE ', HE SAID.
    of ' #OWNER # '. " INTERFACES.
    where = 'INTERFACE_NAME': P2_INTERFACE

    only the State of the field is updateble.
    It is only allowed to update data in the DB table with a PL/SQL procedure:

    Start
    set_interface_vals@DB (p_interface_name = >: INTERFACE_NAME, p_state = >: STATE);
    end;

    I put the prodzedure in a process of Page who act with a "submit" button.
    Now to my problem: How can I get my field INTERFACE_NAME and STATE values. the way I did here does not work.


    Thanks for your help.

    with regard to the sia

    Published by: sia on March 14, 2011 17:46

    Pls update your handful of forum to something more addressable.

    On your question about the opening of the link as a new, blank page, assume that the URL is 'http://www.google.com '.
    change the URL of the button to

    JavaScript:Window.Open ('http://www.google.com');

    or

    JavaScript:popUp2('__http://www.google.com');

  • PL/SQL under the heading "view only"?

    Hello

    I use ApEx 4.0 on the 10g database.

    I need to display the result of a procedure from PL/SQL who write HTML (htp.p).

    So I created a "Display Only" type element.

    It seems that there are two ways to call the procedure:

    *1 :*
    set the Source Type of "body of the PL/SQL function.
    In the field 'Source of value or the Expression' call the procedure: show_cart (...);

    *2 :*
    adjust setting based on output of PL/SQL code «»
    In the "Code PL/SQL which emits HTML" on the ground, call the procedure: show_cart (...);


    The problem is that it break the whole page when you use the 1st solution (only if the procedure write a table), for example if my procedure:
    htp.p('<div>hello</div>');
    It works, but if it does:
    htp.p('<table><tr><td>hello</td></tr></table>');
    It breaks all the page as if a table was not locked, or something like that...

    With the help of the 2nd solution works, but seems to add extra tables, or etc. and it make my margin/margin falls down, I can't implement it properly.


    All I want is to display the result of my procedure, without additional HTML code... and if possible do a javascript function that make an ajax call to a request of the process that calls the procedure...

    Thanks for your help.

    Yann.

    In this case, you could create a region of PL/SQL in your page 0 and make conditional on the current page in a list the pages that you want to use.

    Or you can create an HTML region and do the same thing (probably easier).

    Or you can create an application process and that subordinate to the current page in the specified list.

    Page zero will give you more control over the display position and attributes.

    Without seeing the application, it is difficult to determine the best approach but, in any case, an element display only is not the way to go.

    See you soon

    Ben

  • Strange question before the header function call

    Hello

    I use Oracle APEX 3.2.1.00.10 with a database of Oracle 10.2.0.4. It seems that when I call some functions in an anonymous plsql block a page header before I get

    ORA-01858: a non-digit character was found here where was waiting for a digital

    errors. The functions in question accept 2 types of NUMBER and RETURNS a type NUMBER. The code works correctly PLSQL. Is there a limit on the size of a function I can call
    directly from APEX or maybe theres some type conversion happening?

    All the ideas that it is rather strange that the other functions seem to work well

    Thanks in advance!

    As Paul said, there are probably some date related code in the body of the function. The reason why it performs very well outside the APEX is perhaps because the default NLS_DATE_FORMAT value is different to what uses the APEX. Try to play with it, hope that helps.

  • Saving a file of the APEX help before the process of Header error

    Hello

    I am current trying to simply allow the user to download and save a text file after pressing a button on a page of the APEX. Links to a new page which does nothing except button perform a process before header containing the following pl/sql code:
    begin
    
    -- Set the MIME type
    owa_util.mime_header( 'text/plain', FALSE );
    
    -- Set the name of the file
    htp.p('Content-Disposition: attachment; filename="alphafile.txt"');
    
    -- Close the HTTP Header
    owa_util.http_header_close;
    
    htp.prn('Hello World');
    
    htmldb_application.g_unrecoverable_error := true; 
    
    end;
    When I then press the button to access this page, I get a blank page which shows:

    Content-type: text/plain; Charset = UTF-8 Content-Disposition: attachment; filename = "alphafile.txt" Hello World

    Any help is greatly appreciated.

    Kind regards

    Alex

    Hello

    I think you should do application process state for example PRINT_FILE, and then the url button

    f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.:PRINT_FILE
    

    For this application process "on the load before the heading" need you from your code

    Or try htp.init place start your code

    Hope that helps

    BR, Jari

    Published by: jarola on January 12, 2010 21:40

  • How to run the code (invisible) after connecting and before the first page of the user.

    Our site has a standard login page that I can't change. But I want to run code 1) after logging in the application (not APEX!) and 2) before the first page of the user of the application. How could I (can I?) put it on a page that runs invisible and then transfers it to the first page of the user application? Also, it would be great for testing I could reiniitalize easily between test scenarios without having to log in again.

    Thanks - Howard

    You could put it on page 0 and condition the process so that it works only on the login page.

  • Oracle dynamic SQL with the UNION operator

    Hello

    I have sql string contains two queries separated by the UNION operator. When I run by using DBMS_SQL, it becomes only the first SQL before the UNION operator.

    Can anyone correct how can I Sue UNION in DBMS_SQL?

    Thank you

    Sorry,

    I tested my code

                        BEGIN
                          FOR I IN (SELECT 1 A FROM DUAL UNION
                                  SELECT 2 A  FROM DUAL UNION
                                  SELECT 3 A  FROM DUAL) LOOP
                          DBMS_OUTPUT.PUT_LINE(I.A);
                         END LOOP;
                        END;
                        
    

    and copy this code and PASE to DBMS_SQL. PARSE (all other cases, "... and insert the INSERT STATEMENT but does not erase DBMS_OUTPUT.")

    Edited by: Quluzade Mr. Mahir on February 28, 2011 12:18

  • Before the process of pl/sql header to assign values to the elements on the page

    How can I assign values to the elements of a page based on the data structure returned by a pl/sql procedure in the front header process? I think execution of a pl/sql procedure based on a URL parameter value and then assign values to the page elements. Is this really possible using Apex 4.0.2? If so, how can it be done?

    Thank you

    Salome

    The question is not really clear. What kind of "data structure returned by a procedure from pl/sql? Please be much more accurate.

    For a data structure of PL/SQL such as records containing 2 elements (x and there) returned as output parameter for a procedure to be assigned to 2 items p1_x and p1_ypage, all that is necessary in the header before process is something like

    declare
    ...
      l_rec rec_type;
    ...
    begin
    ...
      the_proc(..., p_out => l_rec, ...);
    
      :p1_x := l_rec.x;
      :p1_y := l_rec.y;
    ...
    end;
    
  • Check if the user has selected box element apex before the loading of the page

    4.2.1

    THM:2

    Hello world

    I have two classic reports with different conditions but even select the columns based on a sql that uses the apex_item.checkbox2 element that allows users to select the lines and run some process. I also have a radio unit that hides and shows these two reports. However, it is possible that the user select a few lines and without doing anything click on the radio button that will present the page and all the lines that earlier he had chosen will be lost. I want that we should be able to pop an alert if there are checkboxes checked and the user tried to hit the button of the radio looks like the APEX_APPLICATION. G_F01. Count is not available at the time the page is submitted. We thought to use a pl/sql to see if APEX_APPLICATION DA. G_F01. Count > 0 then trigger an alert to confirm.

    Any ideas on how to do this?

    Thank you

    ryansun wrote:

    Hi FAC586 - basically, there are two parts of the report, were grouped products consolidated (as master) and the other report has all the products of the child. So based on the option the user selects that he sees who discovers and processes information.

    I tried to create the DA, but he does not seem to fire and I'm sure it would be because I have something wrong.

    No, in this case, there was a typing error in my JS expression above (this is what happens when there is no example in the trial against...)

    Must be:$('td[headers="COL_ALIAS"] input:checked').length > 0

    I have page submit on the evolution of radio, given that other elements of the actual application, don't do with this feature which is filled on the loading of the page.

    It does not work. If the present radio on the presentation changes group cannot be controlled by the dynamic action to confirm that it has already been committed before the confirmation message is displayed. Presentation must be made by further action of real on the DA. By the way other values is possible by using dynamic actions or region to submit elements of Page properties.

    But here it is necessary, if the user has activated all the lines, then changes the selection of the radio, it should show an alert to confirm. In addition, what happens if we have a very select in the box by a header label already. Can I use the same label to identify the COL_ALIAS?

    Do not understand the question.

    Don't know what I'm doing wrong.

    As I noted above, an important part of your problem is that you asking what amounts to a series of questions XY rather than the big picture given by presenting the necessary resources. You have been really good on the creation of examples on apex.oracle.com, but they are all fragments of the righteous, which makes things difficult when you try their synthesis in something that works as a coherent whole. Various bits and pieces that have been revealed in recent weeks, it seems like this could be treated using dynamic measurements without having to send the page until the final choice has been made.

Maybe you are looking for