Javascript in pl/sql process block

Hi,
Can someone please tell me why this code is not working.....
I have put this in my pl/sql process....
htp.p('<script language=javascript>');
htp.p('var r=confirm("This is a duplicate record , do you want to proceed?");');
htp.p('if (r==true)');
htp.p('{document.wwv_flow.submit();}');
htp.p('else{ }');
htp.p('</script>');
Please help
thanks and regards,
deepa

What you need, in your case, is the reverse approach
– calling PL/SQL from JavaScript code – which is
possible, using AJAX...
It seems like what you are trying to do is a
validation process. Pressing the button should fire a
JavaScript code, which in turn will fire an on-demand
PL/SQL procedure, and according to the returned
results will display a confirm dialog boxHi Arie,
This is exactly what I am struggling to do, but I don't think is working...is there a good example somewhere, with good documentation saying what goes where? I've tried looking at Carl's On-Demand page example and I just can't tell if I'm following it correctly.
Based on what is entered in P4_PROJECT_NUM, I need to verify that the value isn't already in the database when the user tabs out of the field.
My javascript for page 4 (in HTML Header):
function checkCO()
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=validate_value',4);
get.add('ID', $x('P4_PROJECT_NUM').value)
gReturn = get.get();
if(gReturn) // if function return true
alert($x('P4_PROJECT_NUM').value + ' already exists in database.');
get = null;
//-->
</script>
My onDemand process, from the Application Processes:
declare
v_count number;
cursor cr_check_co is
select count(*)
from usd_changeorders
where chg_ref_num = v('ID');
begin
open cr_check_co;
fetch cr_check_co into v_count;
close cr_check_co;
if (nvl(v_count, 0) = 0) then
return true;
else
return false;
end if;
end;
I am calling the javascript from the onBlur event of the field I want verified.
I am getting an alert, but it is displaying every time, whether the value is valid or not.
Can you tell me what I am doing wrong?
Thanks!!
Janel

Similar Messages

  • Confirm Box from PL/SQL process

    Hi all,
    I am using Apex 4.1. I have a page from which on cilck of submit button, a process runs. Now this process checks for certain page item values and based on them, a confirmation box is required. Now based on what the user chooses, either a procedure should be called or no action should be taken. I have written the following code but it does not seem to work.
    declare
    v_count number;
    begin
    v_count:=0;
    FOR i IN 1 .. apex_application.g_f07.COUNT
    LOOP
    if (apex_application.g_f07 (i) is not null) then
    v_count := v_count + 1;
    end if;
    end loop;
    if (v_count > 0)
    then
    htp.p('<script type="text/javascript">');
    htp.p('
    var r=confirm("Data entered for Saturday, do you want to proceed?");
    if (r==true)
    PR_TIMESHEET(:P11_PROJ_REF,:P11_RELEASE_ID,:P11_EMP,:P11_DATE,:no_of_rows);
    else
    htp.p('</script>');
    else
    PR_TIMESHEET(:P11_PROJ_REF,:P11_RELEASE_ID,:P11_EMP,:P11_DATE,:no_of_rows);
    end if;
    end;
    I dont know much about Javascript, just got this code through google.....
    Any help would be appreciated.
    Thanks in advance.

    rest_in_peace wrote:
    Hi all,
    I am using Apex 4.1. I have a page from which on cilck of submit button, a process runs. Now this process checks for certain page item values and based on them, a confirmation box is required. Now based on what the user chooses, either a procedure should be called or no action should be taken. I have written the following code but it does not seem to work.
    declare
    v_count number;
    begin
    v_count:=0;
    FOR i IN 1 .. apex_application.g_f07.COUNT
    LOOP
    if (apex_application.g_f07 (i) is not null) then
    v_count := v_count + 1;
    end if;
    end loop;
    if (v_count > 0)
    then
    htp.p('<script type="text/javascript">');
    htp.p('
    var r=confirm("Data entered for Saturday, do you want to proceed?");
    if (r==true)
    PR_TIMESHEET(:P11_PROJ_REF,:P11_RELEASE_ID,:P11_EMP,:P11_DATE,:no_of_rows);
    else
    htp.p('</script>');
    else
    PR_TIMESHEET(:P11_PROJ_REF,:P11_RELEASE_ID,:P11_EMP,:P11_DATE,:no_of_rows);
    end if;
    end;
    I dont know much about Javascript, just got this code through google.....
    Any help would be appreciated.
    Thanks in advance.Does this help? javascript in pl/sql process block

  • Calling Javascript function from PL/SQL Process

    I am new to APEX and Javascript so please forgive my question.
    I have a process on page which successfully runs a few procedures etc. but now, as part of this process, I want to call a javascript function I have typed into the HTML Header.
    My question is how can I call the javascript function from my process? Is it possible?
    Many thanks
    Winnie
    ps. as an example my javascript looks like:
    <script language="JavaScript">
    function test(){
    var decision = confirm("Click a button below and watch what pops up next.");
    alert(decision);
    </script>

    See: How to call a javascript function from pl/sql?

  • SQL 2008 Blocked process report question

    Can you somehow resolve blocked process report stmt to the actual sql text / plan cache?
    Example:
    <blocked-process-report>
    <blocked-process>
    <process id="process2713c9048" taskpriority="0" logused="0" waitresource="RID: 9:3:195169:57" waittime="29735" ownerId="1750917834" transactionname="SELECT" lasttranstarted="2014-01-10T13:47:06.493" XDES="0x259c278e0" lockMode="S" schedulerid="4" kpid="4148" status="suspended" spid="307" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2014-01-10T13:47:06.493" lastbatchcompleted="2014-01-10T13:47:06.493" lastattention="2014-01-10T13:46:55.703" clientapp="Index" hostname="IMAGIOZFPWEB1" hostpid="12000" loginname="imagiouser" isolationlevel="read committed (2)" xactid="1750917834" currentdb="9" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056">
    <executionStack>
    <frame line="18" stmtstart="640" sqlhandle="0x03000900280270067c9946015aa200000100000000000000"/>
    </executionStack>
    <inputbuf>
    Proc [Database Id = 9 Object Id = 108003880] </inputbuf>
    </process>
    </blocked-process>
    <blocking-process>
    <process status="suspended" waittime="151008" spid="451" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2014-01-10T13:45:05.217" lastbatchcompleted="2014-01-10T13:45:05.217" clientapp="Index" hostname="IMAGIOZFPWEB2" hostpid="4472" loginname="imagiouser" isolationlevel="read committed (2)" xactid="1750871840" currentdb="9" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
    <frame line="57" stmtstart="4426" stmtend="4586" sqlhandle="0x03000900f28e8b0183d457018a9d00000100000000000000"/>
    <frame line="32" stmtstart="1824" stmtend="2042" sqlhandle="0x030009001b21cf3f56fe3c01dca100000100000000000000"/>
    </executionStack>
    <inputbuf>
    Proc [Database Id = 9 Object Id = 1070539035] </inputbuf>
    </process>
    </blocking-process>
    </blocked-process-report>

    Here is an example to get you going:
    DECLARE @x xml = '
    <blocked-process-report>
     <blocked-process>
      <process id="process2713c9048" taskpriority="0" logused="0" waitresource="RID: 9:3:195169:57" waittime="29735" ownerId="1750917834" transactionname="SELECT" lasttranstarted="2014-01-10T13:47:06.493"
    XDES="0x259c278e0" lockMode="S" schedulerid="4" kpid="4148" status="suspended" spid="307" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2014-01-10T13:47:06.493"
    lastbatchcompleted="2014-01-10T13:47:06.493" lastattention="2014-01-10T13:46:55.703" clientapp="Index" hostname="IMAGIOZFPWEB1" hostpid="12000" loginname="imagiouser" isolationlevel="read committed
    (2)" xactid="1750917834" currentdb="9" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056">
       <executionStack>
        <frame line="18" stmtstart="640" sqlhandle="0x03000900280270067c9946015aa200000100000000000000"/>
       </executionStack>
       <inputbuf>
    Proc [Database Id = 9 Object Id = 108003880]   </inputbuf>
      </process>
     </blocked-process>
     <blocking-process>
      <process status="suspended" waittime="151008" spid="451" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2014-01-10T13:45:05.217" lastbatchcompleted="2014-01-10T13:45:05.217"
    clientapp="Index" hostname="IMAGIOZFPWEB2" hostpid="4472" loginname="imagiouser" isolationlevel="read committed (2)" xactid="1750871840" currentdb="9" lockTimeout="4294967295"
    clientoption1="671088672" clientoption2="128056">
       <executionStack>
        <frame line="57" stmtstart="4426" stmtend="4586" sqlhandle="0x03000900f28e8b0183d457018a9d00000100000000000000"/>
        <frame line="32" stmtstart="1824" stmtend="2042" sqlhandle="0x030009001b21cf3f56fe3c01dca100000100000000000000"/>
       </executionStack>
       <inputbuf>
    Proc [Database Id = 9 Object Id = 1070539035]   </inputbuf>
      </process>
     </blocking-process>
    </blocked-process-report>'
    ; WITH CTE AS (
      SELECT sqlhandle = convert(varbinary(64), T.c.value('@sqlhandle', 'varchar(128)'), 1),
             stmtstart = T.c.value('@stmtstart', 'int'),
             stmtend   = T.c.value('@stmtend', 'int')
      FROM   @x.nodes('/blocked-process-report/blocked-process/process/executionStack/frame') AS T(c)
    SELECT substring(est.text, CTE.stmtstart / 2,
                     CASE WHEN CTE.stmtend IS NOT NULL
                          THEN (CTE.stmtend - CTE.stmtstart) / 2
                          ELSE len(text)
                     END)
    FROM CTE
    CROSS APPLY sys.dm_exec_sql_text(CTE.sqlhandle) AS est
    That is, you need to use XQuery to extract the sqlhandle and the offsets and then pass the sqlhandle to sys.dm_exec_sql_text. The text is for the full batch, so you need to use substring to get the statement. stmtstart and stmtend are offsets in bytes and
    since the text is nvarchar, you need to divide by two. I did the above from memory and there by one-off errors with regards to the offsets.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Multi Row update using pl/sql anonymous block process

    Does anyone have an example of multi row update using a pl/sql anonymous block process?
    The reason I can not use the apex mru process is that the table in questions has a five field key.
    My attempts have failed with a bad number.
    Thanks,
    Gary

    Hi Gary,
    can y<ou pls send the definition of thet table and the UPDATE sql.
    It is a littel difficult like this.
    We need more info.
    BR,
    Lutz
    =;-)

  • PL/SQL process and popup URL

    Hi,
    I have a PL/SQL process which is called on submit but a button. This Pl/SQL creates a file on the web-server and I then want to open this file in a new browser window using the URL path to it. Can this be done from pl/sql or do I need to embed some javascript somewhere in the page. My eg block is :-
    begin
    pack.proc(15);
    owa_util.mime_header('application/vnd.ms-word');
    htp.init ;
    owa_util.redirect_url('http://server:port/my_dir/myfile.doc');
    end;
    The redirect doesnt do anything.
    Thanks for any assistance,
    Brandon

    Hi Teku,
    You just have a look at this thread, where u can find a solution for your problem.
    INSERTING Records into Second table based on First table Primary Key
    hope this helps.
    Bye,
    Srikavi

  • Problem setting a hidden item value when button clicked with dynamic action or pl/sql process

    Apex 4.1
    Oracle 11g
    I have a page that consists of a main region and several sub regions.  I have a pl/sql process in After Header SET_DISPLAY(:P400_DISPLAY :='MAIN';)
    Three subregions have a contional display where P400_DISPLAY = STORE.  This works in hiding the sub regions.
    Now I want to change the P400_DISPLAY value to STORE to show the subregions when I hit a button.
    I tried creating a dynamic action for on click of the add button but get the following error:
    The selected button uses a 'Button Template' that does not contain the #BUTTON_ID# substitution string
    I went to the templates and found:
    Substitution Strings
    Substitution strings are used within sub templates to reference component values. This report details substitution string usage for this template.
    Substitution String
    Referenced
    From
    Description
    #LINK#
    Yes
    Template
    To be used in an "href" attribute
    #JAVASCRIPT#
    No
    To be used in an "onclick" attribute
    #LABEL#
    Yes
    Template
    Button Label
    #BUTTON_ATTRIBUTES#
    No
    Button Attributes
    #BUTTON_ID#
    No
    Generated button ID will be either the button's Static ID if defined, or if not will be an internally generated ID in the format 'B' || [Internal Button ID]
    I then tried creating a page process, pl/sql, :P400_DISPLAY :='STORE'; when the appropriate button is pressed.  The button action is submit page. However, it does not change the P400_DISPLAY value and the subregions stay hidden.
    Suggestions please on how to fix the template or change the P400_DISPLAY value?

    The root issue is that, although you change the value of your page item, it isn't visible to other areas of the page until it is in the session. So, any other action based on the value of your page item; the visibility of a control, a report based on the item's value, etc. will all be unaffected by changing the value of the page item until it has been changed in the session. Even after this the items are stored in the session, you must thereafter do something to cause the value to be reevaluated. To see the effect of this, observe that your page loads and evaluates the value of your page item, it sees that is "MAIN" and hides the regions. However, it doesn't reevaluate them after this.
    So; your choices to get this value set in the session are to either Submit the page, or use JavaScript to set the value in the session. If you use the latter of these, you'll have to do some further work to cause the visibility tests to be re-run, So, let's stick with with the submit method.
    What you've done above sounds correct for this but, there are a lot of decisions you could have made that might have caused things not to happen in the correct sequence.
    Firstly, let's confirm that what I describe above is your problem. From the development environment, load the page, click the button to change the value and submit. Now, click the link labelled Session. Is it still set to MAIN? If so; this is your issue.
    Let's start with the your After Header computation. Did you set it to *only* run if the current value of your page item is NULL??? If not, that's your problem.
    Load Page -> Item set to 'Main' by Computation -> Click Button -> Item set to STORE -> Submit -> Load Page -> Item set to 'Main' by Computation
    See the problem?
    Assuming this isn't the issue, you created a Branch to the same page, right? What is your process point for the Branch? Is it *After* Validation, Computation etc? Because if not, you aren't changing the value before the submit happens.
    I bet it is the first issue but, take a look at these.
    Cheers,
    -Joe

  • HTML Form in a "PL/SQL (anonymour Block)"

    Hello
    I need a little ugent guidance
    I have create a "form" within a "PL/SQL (anonymour Block)". The requirement is to show what a HTML form looks like as you build the code
    The problem is I am "Up Setting" the APEX processing i.e. wwv_flow.accept ... I have added an example below .....
    All help very welcome
    Thanks
    Pete
    htp.prn('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">');
    htp.prn( '<style type="text/css">');
    htp.prn('#form{font-family: "Trebuchet MS", Verdana, sans-serif; width:25em;}');
    htp.prn('h2{margin: 0 0 0 0; padding: 0;}');
    htp.prn('p{margin: 0 0 1em 0; padding: 0; font-size:90%}');
    htp.prn('fieldset{background:#C361D2; border:none; margin-bottom:1em; width:24em; padding-top:1.5em}');
    htp.prn('p.legend{background:#DED983;
    color:black;
    padding: .2em .3em;
    width:750px;
    font-size:18px;
    border:6px outset #DED980;
    position:relative;
    margin: -2em 0 1em 1em;
    width: 20em;}');
    htp.prn('fieldset{margin-bottom:1em; width:66em; padding-top:1.5em;}');
    htp.prn('#company {background:#F3B4F5; border:outset #F3B4F5; width="700";}');
    htp.prn('#company label{position:absolute;
    font-family:arial;
    font-size:16px;
    padding:.2em;}');
    htp.prn('input{margin-left:9em;margin-bottom:.2em; line-height:1.4em;}');
    htp.prn('#message1 {background:#a3B4F5; border:outset #a3B4F5; width="700";}');
    htp.prn('#message2 {background:#c3B4F5; border:outset #c3B4F5; width="700";}');
    htp.prn('button1 {font:48px "Trebuchet MS", "Verdana", sans-serif;
                     background:#F0888A;
                     border:outset #6EC6F1}');
    htp.prn('#buttons1 input {background:#DED983;
    font:1.2em "Trebuchet MS", Verdana, sans-serif}');
    htp.prn('p#buttons1 {white-space:nowrap}');
    htp.prn('</style>');
    htp.prn('<table width="760"><tr bgcolor="#D5EAE9">');
    htp.prn('<BR><BR>');
    htp.prn ('<form method="" action="">');
    htp.prn ('<fieldset id="company"><p class="legend" >Company</p>');
    htp.prn ('<label>Comapany Name: </label> <input name="company" type="Text" size="30"/>');
    htp.prn ('<br><br>');
    htp.prn ('</fieldset>');
    htp.prn ('<br><br><br>');
    htp.prn ('<fieldset id="message1"><p class="legend">Message One</p>');
    htp.prn ('</fieldset>');
    htp.prn ('<br><br><br>');
    htp.prn ('<fieldset id="message2"><p class="legend">Message Two</p>');
    htp.prn ('</fieldset>');
    htp.prn ('<br><br>');
    htp.prn ('</form>');
    htp.prn('</tr></table>');
    End;
    ______________________________________________________________________________________________________

    Pete:
    Remove the name attributes from all input elements defined by the pl/sql process. For example
    <input name="company" type="Text" size="30"/> should be replaced by <input type="Text" size="30"/> or <input name="f01" type="Text" size="30"/>
    The APEX accept process recognises a predefined set of HTML form input names. Any input with a name not from this set will cause the accept process to fail. f01 through f50 are valid names for the accept procedure.
    varad

  • Alert/Warning messages from PL/SQL process

    Hi all,
    I have a PL/SQL process that I execute from javascript : doSubmit(MY_PROCESS). I want to output an alert box if some errors occurs in the process, for instance : alert('message'). Does anyone know how to do that ?
    Best regards,
    Othman.

    Thanks Andy for the reply.
    My process executes "after submit", so I cannot call directly the javascript as one mentioned. The call to "html_Get" seems to be quite complicated for a simple alert message which is not really a Application process shared component.
    So I'll go for a solution where users won't see error messages ...
    Best regards,
    Othman.

  • Calling JS function in pl/sql process

    Hello!
    I have a js function defined in 'HTML Header' :
    <script language="JavaScript" type="text/javascript">
    function disp_alert()
    alert("Data is invalid! Correct the data and click CONFIRM again.")
    </script>
    I also have a pl/sql process on this page. I want to call disp_alert function in a following way:
    if ... then call function
    else dbms_output.put_line('...');
    end if;
    How can I call this js function in 'if'??
    Tom

    There ARE ways to accomplish something like this, but they're much more complex.
    You must create a JavaScript that uses APEX's built in AJAX components; a form button will call the JavaScript, which will in turn call a PL/SQL procedure saved as an "On Demance Shared Application Process." This procedure can run any checks you like against the DB, and return data to the Javascript to display in an alert.
    You can see an example of this in use at an APEX page I created: http://htmldb.oracle.com/pls/otn/f?p=19864:5
    This isn't the same thing, but is accomplishing what it does through an APEX form, a javascript call on the text field to a PL/SQL Process that returns rows from the database dynamically...thus allowing the client side JavaScript to call server side PL/SQL.

  • Before header pl/sql process creates blank space at top of page

    Hi,
    I'm finding that w/v 1.6.1 I get a blank space at the top of my page that appears to be somewhat proportional to the amount of code and/or # processes on that page that are before header. moving to after header and before regions also shows this behavior.
    There are no blank line outputs happening in the pl/sql processes, so I've got no idea why htmldb is putting blank space there.
    Anyone seen anything like this? Oracle 9.2.0.7, winxp pro
    Thanks
    matt

    Hi,
    I've had the same problem. I'm assuming that you have a region in the "After Header" position?
    If so, you could add the following in the region's Region Header:
    &lt;div style="display:none"&gt;
    and put this in the Region Footer:
    &lt;/div&gt;
    The region is defined in a table, which by definition is a block object. Block objects always begin on a new line and end with a new line - the above will put the region into a div and then hide the div.
    Regards
    Andy

  • Calling PL/SQL anonymous block from href in tabular report

    apex 2.2.
    I've got a tabular report where I've added some img columns with a href to call diff processes
    for example
    "<a href="f?p=&APP_ID.:22:&APP_SESSION.:BRANCH_TO_PAGE_ACCEPT|NEW_PROXY:NO:::22,ABCDEF ><img src="/i/asyl.gif" border="0" alt="Runprocess"></a>"
    When clicking on an image column in row x then I would like to run the process - no page submit.
    The pl/sql anonymous block process source calls package.storedproc(p1,p2) - two in parameters
    I'm struggling with the syntax and is wondering if there's a smarter way to achieve the same function
    Any ideas most welcome
    Thanks
    Peter

    &lta href="f?p=&APP_ID.:22:&APP_SESSION.:BRANCH_TO_PAGE_ACCEPT|NEW_PROXY:NO:::22,ABCDEFG" &gt&ltimg src="/i/asylogin.gif" border="0" alt="Process"&gt&lt/a&gtQuestion is how can you pass values from a row in a tabular report to the application process ?

  • #FLOW_OWNER#  in pl/sql process

    I am trying to use #FLOW_OWNER# substitution string in pl/sql processes so I dont have to hard code the schema name. This substitution string works fine if I use it in a report for example 'select * from #FLOW_OWNER#.APEX_APPLICATION_PAGE_IR_COL'
    However if I use it an insert in pl/sql process, I get the following error.
    ORA-06550: line 5, column 2: PL/SQL: ORA-00911: invalid character ORA-06550:
    Here is the code
    insert into ssm_help(application_id,application_item_id,help_item,help_desc,help_type_id)
    (select :P11_APPLICATION_ID, :P11_APPLICATION_ITEM_ID, report_label,'Enter Help',(select help_type_id from ssm_help_type where help_type_code='REPORT_COLUMN')
    FROM
    #FLOW_OWNER# .APEX_APPLICATION_PAGE_IR_COL;
    Any ideas what the problem is ? Thanks.

    Hi,
    I once used the global substitution variable APEX_APPLICATION.G_FLOW_SCHEMA_OWNER, but I had to encapsulate the query in an EXECUTE IMMEDIATE block.
    Here's my example:
    DECLARE
      l_flows_owner VARCHAR2(32);
      l_query VARCHAR2(2000);
      l_count NUMBER(10,0);
    BEGIN
      l_flows_owner:=APEX_APPLICATION.G_FLOW_SCHEMA_OWNER;
      l_query:='SELECT COUNT(DISTINCT APPLICATION_ID)
                FROM '||l_flows_owner||'.APEX_APPLICATIONS';
      EXECUTE IMMEDIATE l_query INTO l_count;
      RETURN l_count;
    END;This will work in your case too.
    -Udo

  • PL/SQL process returning message with more than 4000 chars

    In our apex application we are using a pl/sql process returning a message.
    This message should be shown to the user.
    Our problem is now, that the application items in APEX seem to be limited to 4000 chars and the message can be longer.
    We are also not able to use a collection, because we can't print the content of a collection in the "Process Success Message".
    Here is the content of a page process which is running on page load after header:
    Name - Type:     PL/SQL anonymous block
    Source - Process: :AI_TEST := p0001_pkg.get_text;
    Messages - Process Success Message: &AI_TEST.
    Image from process [https://twitter.com/OliverLemm/status/324058809138032640/photo/1/large]
    If the page is called the result is this error message:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Technical Info (only visible for developers)
    is_internal_error: false
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    component.type: APEX_APPLICATION_PAGE_PROCESS
    component.id: 16433072916569237418
    component.name: get_text
    error_backtrace:
    ORA-06512: at "APEX_040200.WWV_FLOW_PROCESS", line 100
    ORA-06512: at "APEX_040200.WWV_FLOW_PROCESS", line 141
    Edited by: Oliver L on 16.04.2013 09:17

    no an item like P0_TEST on page 0 / global page also does not help.
    But the error is not the application item / page item it's the problem that the "Process Success Message" can't handle more than 4000 chars.
    I tried to paste a string into the process success message, but the error "Error processing row. ORA-01461: can bind a LONG value only for insert into a LONG column" occured even when i filled the textarea and saved the process.
    So there's no problem with the application item or page item.
    Edited by: Oliver L on 16.04.2013 10:00

  • How come the item value does not come thru via PL/SQL anonymous block?

    Hi,
    It's a Form with 3 tables -
    1) ClinicianProfileTb (with about 40 columns, insert/update via DML),
    2) PeopleTb (with about 7 columns, insert/update via PL/SQL anonymous block) and
    3) ClinicianPracticeTb (with about 10 columns, insert/update via PL/SQL anonymous block) for after-submit-processes.
    So I have several After-Submit-Processes. For some reason, it appears that PeopleId which is supposed to come thru via the 2nd After-Submit-Process (ie: Insert/Update PeopleTb) does not do the way it's supposed to. And when I press "Create" button at the bottom, I got the following error msg:
    ORA-01400: cannot insert NULL into ("TEST_0712"."CLINICIANPRACTICETB"."PEOPLEID")
    I tried the "debug" mode (via edit page link), but to no avail. (I'm newbie, trying to learn and deliver at the same time :)).
    I uploaded the app to apex.oracle.com, if someone could kindly take a look and let me know what goes wrong, it'd be greatly appreciated.
    workspace: test_0712
    app: 43408 - TEST
    user: demo
    pswd: demoPswd
    Page#21 -> look at the After-Submit-Processes -> in "Insert/Update PeopleTb" it appears that PeopeId does not come thru; thus it cannot be updated to ClinicianProfileTb.PeopleId (allows null) -> and thus cannot be inserted into ClincianPracticeTb.PeopleId (which does NOT allow null). Basically my logic is that in order to create ANY row in ClinicianPracticeTb, BOTH PracticeId AND PeopleId must be present.
    Acutally I should have used the PeopeTb as DML (as the driving table) to enforce that PeopleId must be present in order to insert ClinicianProfileTb and ClinicianPracticeTb, but it'd be lots of codes to write to insert/update in ClinicianProfileTb (40 columns).
    In addition, does ApEx consider EVERY SINGLE after-submit-process are in ONE transaction for commit/rollback? It appears that it treats all PL/SQL anonymous blocks are in ONE transaction, while Automatic Row Processing (DML) is commited/rolled back on its own?
    Thanks much,
    Helen

    All blocks that do not commit in one of the ways I detailed (and which do not explicitly commit using a commit statement) are part of the transaction started with > the first DML statement issued in any of the page processes and continuing until a commit is issued.Say, there are the following processes in the After-Submit-Processes:
    1. Process1 -> Automatic Row Processing (DML)
    2. Process2 -> PL/SQL anonymous block
    3. Process3 -> PL/SQL anonymous block
    Based on what you describe, in the event that if there is no explicit "commit" issued in any of these processes, then an implicit "commit" will be issued at the end of Process3?
    Thanks, Scott.
    Doreen

Maybe you are looking for

  • Cisco 9971 phone over VPN

    Hi I am trying to set up a anyconnect VPN for Cisco 9971, so that I can use it at home. the tunnel has up, I've tested it but Phone got the following error message: 11:56:11 Updating Trust List 11:56:11 Trust List updated 11:56:12 SEP0011111111.cnf.x

  • Zen 4 imaging pmap and transaction server errors

    Hi, I am running Zen4 ir7 on a netware 65 sp5 server and trying to run use pxe at the workstation to get images to upload from new workstations. I am running into an error when pxe loads and gives me the following two messages No response from portma

  • Blanket PO ( Framework Order)

    Hi Folks, I am trying to configure Blanket PO and am having some issue. Could someone help me please. in OMR6 i have set the tolerance limits  for tolerance keys LA & LD both Absolute and Percentage.. and also set up error status for message 297. Whe

  • Output price variance calculation

    Hello, I have a question on output price variance calculation in SAP. The help reads: "Output price variances are reported in the following situations: If the standard price has changed between the time point of delivery to stock and the time point w

  • Finding the largest values of an array without using if condition

    Hi, I am trying to find the largest values of an array without using any if condition. Can any one tell me the solution for that.. Thanks