do called ondemand dynamic process

Hi guys,.

I write a js code to call and run several processes application ondemand level as below - any process on request can be passed when the js code is triggered by button

#1.

function updateEmp (p_proc, p_empno) {}

var v_value = document.getElementById (p_empno) .value;

var v_proc = 'APPLICATION_PROCESS =' + p_proc;

asynchronous HTTP AJAX request using jQuery

$.ajax({)

type: 'POST',

URL: "wwv_flow.show",

data: {}

p_flow_id: $('#pFlowId').val (),.

p_flow_step_id: $('#pFlowStepId').val (),.

p_instance: $('#pInstance').val (),.

x 01: v_value,.

p_request: ' "' + v_proc + '"' / /'"APPLICATION_PROCESS =" + p_proc + ' "' designate the application process"

},

beforeSend:

function() {}

do something

},

success: / / to be called if the request is successful

function() {}

do something here

Alert (' test this value = "+ v_value);

}

});

}

#2. the call button (url redirect) is

JavaScript:updateEmp('OnDemandx',_'P3_EMPLOYEEID');

but when I hardcode the process name directly as below, it works.

, p_request: ' "APPLICATION_PROCESS = OnDemandx"

so, what could be the problem here?

Apex 5.x

Kind regards

Gor_Mahia wrote:

I write a js code to call and run several processes application ondemand level as below - any process on request can be passed when the js code is triggered by button

What exactly is the point of this? The result of each process on request will probably be different, so as well as use the "dynamic" process, the function must also manage the value returned by the callback dynamically, which it does not currently appear to support.

Always advanced postal code using the functionality of the syntax highlighted in the editor.


function updateEmp(p_proc, p_empno) {

    var v_value = document.getElementById(p_empno).value;
    var v_proc =  'APPLICATION_PROCESS=' + p_proc;

  // perform an asynchronous HTTP AJAX request using jQuery
  $.ajax({
    type: "POST",
    url: "wwv_flow.show",
    data: {
      p_flow_id: $('#pFlowId').val(),
      p_flow_step_id: $('#pFlowStepId').val(),
      p_instance: $('#pInstance').val(),
      x01: v_value,
      p_request: '"' + v_proc + '"'  //'"APPLICATION_PROCESS=' + p_proc + '"'  refer to the application process
    },
    beforeSend:
      function() {
    // do something
      },
    success:  // to be called if the request succeeds
      function() {
      // do something here
        alert('tested this value = ' + v_value );
      }
  });
}

but when I hardcode the process name directly as below, it works.

, p_request: ' "APPLICATION_PROCESS = OnDemandx"

so, what could be the problem here?

Line 15: v_proc a string value is not a literal and so should not be enclosed in quotes:

function updateEmp(p_proc, p_empno) {

    var v_value = document.getElementById(p_empno).value;
    var v_proc =  'APPLICATION_PROCESS=' + p_proc;

  // perform an asynchronous HTTP AJAX request using jQuery
  $.ajax({
    type: "POST",
    url: "wwv_flow.show",
    data: {
      p_flow_id: $('#pFlowId').val(),
      p_flow_step_id: $('#pFlowStepId').val(),
      p_instance: $('#pInstance').val(),
      x01: v_value,
      p_request: v_proc
    },
    beforeSend:
      function() {
    // do something
      },
    success:  // to be called if the request succeeds
      function() {
      // do something here
        alert('tested this value = ' + v_value );
      }
  });
}

Using the apex.server.process API would be clearer and involve a lot less typing.

Tags: Database

Similar Questions

  • What's wrong in my ondemand insert processes

    All,

    I write ondemand basic process in order to insert the record when the button is clicked,

    Here is my not seem valid but do not insert:

    process level ondemand App:

    --------------------------------------------------

    DECLARE

    EmpName varchar2 (50);

    BEGIN

    -some_var1: = my_package.my_function (: P1_EMPNO,: P1_DEPTNO);

    insert into testemp values ('TEST INSERT');

    insert into testemp values(:P1_EMPNAME);

    HTP.p (some_var1);

    exception

    while others then

    HTP.p ('exception1');

    END;

    THEN call process ondemand in javascript & global declaration of the page section:

    ---------------------------------------------------------------------

    function insert_fnc()

    {

    var ajaxRequestd = new htmldb_Get (null, &. APP_ID "APPLICATION_PROCESS is insert_employee", & APP_PAGE_ID.);

    ajaxRequestd.add ('P1_EMPNAME', $v ('P1_EMPNAME'));

    ajaxResult = ajaxRequestd.get ();

    ajaxRequestd = null;

    Alert ("value is =" + $v ('P1_EMPNAME'));

    Return ajaxResult;

    }

    to my surprise it is not even insert values hard-coded, so what could be the problem here?

    using apex 4.2

    Thank you in advance.

    Hello

    I guess that your process on request gives an error because you have not declared variable some_var1

    Kind regards

    Jari

  • Call a dynamic action automatically on a regular basis

    Hello
    We have a classic report which we would like to refresh that page every X minutes. We did this by using setInterval and $a_report but as I understand it, it is a unsupported feature... So I would go down the road of the dynamic action.

    But my question is this... How can I call the dynamic action automatically say every 3 minutes, with no user interaction?

    Hello Dev,

    You can use [url http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-plug-ins-182042.html] Plugin Timer

    Best regards
    Fateh
    ----------
    If you believe that my answer is correct or helpful to you, then please check the response as helpful or appropriate.

  • Call for a process of page by clicking a link

    I have a report of the Apex with several lines and a column of link in. I would like to be able to call a page process to work on the line with the clicked link... I also need a couple of settings somehow to the process page that he calls a procedure that requires the parameters to operate correctly.

    So-
    When I click on a link on a line... maybe a couple of hidden objects page get ready.
    The page is then submitted and my process calls the procedure by using the values of the elements defined above as its parameters.
    Control is subject to the original page.

    So, basically, I'm trying to allow a user to perform repetitive actions on each line.

    My thought was to use a URL in the link and perhaps Javascript... or I am barking the wrong tree and is there a better way rather than a link?

    Thoughts?
    See you soon
    Ken

    You have the right idea. JavaScript is the way to go. Assuming that the values that are passed are part of this line of data, you can build the call to process JavaScript.

    Create two hidden objects on your page, make sure that they are not protected.
    say P1_CITY and P1_STATE

    Say your city query included and the State, define a column in the report as a link of the URL target with the following url

    JavaScript:MyFunction('#City#',_'#State#');

    Then set a javascript function in the HTML header section page

    function myFunc (City, pState) {}
    $x_value ('P1_CITY', City);
    $x_value ('P1_STATE', pState);
    doSubmit ('RUNPROC');
    }

    Then a process on the page did you want and which is conditional on the APPLICATION = "RUNPROC."

  • Help by calling the dynamic columns in anonymous blocks

    my code:

    DECLARE
    col1 VARCHAR2 (20): = "City";

    BEGIN
    I'm in (select * from xbd.cus_ord where rownum < 10)
    LOOP
    - I would call col1 dynamically here in my outings DBMS.
    DBMS_OUTPUT. Put_line (i.col1);
    END LOOP;
    END;
    /


    The code above I tried to call a dynamic column. How can I do that.
    I Heve been tried differently using EXECUTE IMMEDIATE. It still does not work.

    THX,
    VI
    DECLARE
       col1        VARCHAR2(30)   := 'object_name';
    
       TYPE REF_CURSOR IS REF CURSOR;
    
       refCursor   REF_CURSOR;
       text        VARCHAR2(4000);
    BEGIN
       OPEN refCursor FOR 'SELECT ' || col1 || ' FROM all_objects WHERE ROWNUM < 10';
    
       LOOP
          FETCH refCursor
           INTO text;
    
          EXIT WHEN refCursor%NOTFOUND;
          DBMS_OUTPUT.PUT_LINE(text);
       END LOOP;
    END;
    /
    
  • Call another bpel process BPEL process

    Hi all

    I created 2 processes BPEL (main & Sub procedure).
    My hand-process I tried to call the sub-process thro' INVOKE activity.

    The way, I tried:

    A link partner for subprocess in my hand-process giving the sub-proc. path of WSDL.

    To pass values from beneath treat I have a value assigned to the variable entry invoke activity.

    When I run my main process, the display of flow in BPEL ENgine displays only the sub-process with error like

    Error in assessing <>expression.
    The result is empty for the XPath: "client: SUBProcessRequest / client: entry.

    Guide me wht, I was wrong.


    Thank you
    VIKI.

    Hello

    Your input message passed to the procedure, go to the XPATH expression "customer: SUBProcessRequest / client: entry" fails, it might be that the input messages is not mapped in the namesspaces or the message you send is not the element "customer: input.

    Marc

  • selection list loading using the ondemand/ajax process data

    Guys,

    Ive has a selection list that has a query default LOV (select jobname d, jobid r of the work) but now iam trying to create application processes to pass new values LOV (like select ename d, empno from emp by 1 r) replacing the previous lov when a button is clicked

    any idea please?

    Apex 4.2.x

    Kind regards

    Gor_Mahia wrote:

    fac586

    good idea to use the function in the pipeline, but I really want to use ondemand/ajax call here I don't mind spending extra energy so long as its feasible

    I never mentioned in pipeline functions.

    A dynamic LOV can be created as either a static SQL query:

    select ename l, empno v from emp order by 1
    

    or in the body of a function that returns a SQL query:

    declare
    
      lov_sql varchar2(4000);
    
    begin
    
      if :foo > :bar
      then
        lov_sql := 'select dname l, deptno v from dept order by 1'
      else
        lov_sql := 'select ename l, empno v from emp order by 1'
      end if;
    
      return lov_sql;
    
    end;
    

    This will allow you to create a dynamic data source for the LOV using some logic is required. LOV options can be modified using standard dynamic action of refreshment. There is no need to create an additional On demand process or write complex AJAX code. Use declarative when possible.

    "Less code is less than bugs. Seek ways to write less code. "- Tom Kyte

  • Call javascript application process

    I use 5 APEX. I have a page that I use a button to call js and dynamic action.

    I created the button on my page with action "Defined by the dynamic Action" and static id "ajax".

    I added this js on my page 'function and declaration of global variables ' section:

    $('_#ajax').click (function () {}

    var ajaxRequest = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is getId', 0);

    var ajaxResult = ajaxRequest.get ();

    Alert (ajaxResult);

    $.ajax({)

                 url: " http://10.25.7.84/WS/selectionService/currentSelection/student ",

    type: 'POST',

    data type: 'json ',.

    contentType: "application/json",

    data: ' {'mode': 'set', 'ID': "[" + ajaxResult + "]","page": 1, "pageSize": 20 "}'

    });

    Alert (' we need to find a better message - value current selection complete ');

    });

    I have created a process called 'getid ':

    DECLARE

    p_app_id NUMBER: = 100;

    p_page_id NUMBER: = 13;

    BEGIN

    ...

    END;

    2 questions:

    (1) I want this application process to be reusable for multiple pages/applications, so I need to replace the hard-coded "p_app_id", "p_page_id" with something I can put on each page. What is the best way to do it? Elements of the application? How and where should I set up on the page?

    (2) in my js, I don't want to hard-code the IP address in the URL.  url: "http://10.25.7.84/ws/selectionservice/currentselection/student". "" Y at - it something that I can use so that it uses the IP that APEX was running on?

    Hi bobmagan,

    bobmagan wrote:

    I tried, but it doesn't seem to work. The application process worked when I had coded the 2 variables. Don't know if its something in the code, that's why I've included pieces that use 'p_app_id' and 'p_page_id '.

    You can access the app ID and the ID of the Page in javascript and send it to your AJAX process as follows:

    • JS code:
    $('#ajax').click(function(){
        var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getId',0);
        ajaxRequest.addParam('x01',$x('pFlowId').value);
        ajaxRequest.addParam('x02',$x('pFlowStepId').value);
        var ajaxResult  = ajaxRequest.get();
        //alert(ajaxResult);
        $.ajax({
            url: "http://10.25.7.84/ws/selectionservice/currentselection/student",
            type: "POST",
            dataType: "json",
            contentType: "application/json",
            data: '{"mode":"set","ids":"[' + ajaxResult + ']","page":1,"pageSize":20}'
        });
        //alert('We need to find a better message - Set Current Selection Complete');
    });
    
    • AJAX PL/SQL process:
    DECLARE
    
        p_app_id   NUMBER := APEX_APPLICATION.G_X01;
        p_page_id  NUMBER := APEX_APPLICATION.G_X02;
    
    BEGIN
      ...
    END;
    

    Kind regards

    Kiran

  • The call for a process of application using JS by a button

    Hello

    I need to create a button that deletes the entire table All_References lines.

    I have created a new process of shared components "Delete_All_References" call, then set it to run on demand.

    PL/SQL block:

    Begin
    Delete from All_References;
    End;
    /

    In the HTML header of the page on which lies the button 'Remove all references' or P13_DeleteAllReferences, I entered in the following:

    < script language "JavaScript" type = "text/javascript" >
    function Delete_All_References()
    < /script >

    I have then entered the settings button, set the action to "defined by dinamic action", then added onchang = "javascript:Delete_All_References();" "in HTML table cell attributes.

    According to most of the tutorials when I click the button remove all the button of refereneces, my table should now get clear but it doesn't.

    Can you guys please help?

    Thank you and best regards,
    Diez

    The onchange event will work fine. Change the button back to a normal button instead of linking to a dynamic Action for now.

    The only other thing I see which can cause a problem is your call to the method itself.

    OnChange = "JavaScript:Delete_All_References();" »

    Need to replace...

    OnChange = "JavaScript:delete_all_references();" »

    The called javascript method is case-sensitive.

    Let me know if it suits it.

    Malay Keith
    www.blackhawkenterprise.com

  • Questions: call vi dynamically using vi Server

    I have a few questions about the next vi.

    1. is there a better way to determine at run time whether a vi is part of a generation or not?

    2. is there a better way to pass values to a dynamic called vi.  Or, better yet, a better way to call a vi dynamically?

    3. when I run the code as shown above in a generation vi does not actually open. It opens fine when it isn't a building.  However, when I call the vi dynamically and activate the vi down right, 2 windows will pop up, the dynamics and the other.  Clues as to what is happening here?

    You did it ensure that your disabled VI is listed as VI to be included in the build specification?  If you do not, when the VI is built in a .exe, the block diagram to disable and the VI it contains are probably be stripped of the .exe

  • The call for a process when you click the link export v4.1.1.00.23

    Version 4.1.1.00.23

    Hello

    I have 6 Classic reports on the page.

    Each report has link active Export.

    I need to insert the set of results that is questioned about the report in a table. Each report is independent of each other.

    Each report has its own table to insert the result set in.

    My thought was to call a process Page when a user has clicked on the link export, but the process is not known. I put: apex_application.g_print_success_message: = 'Insert '; in the process of the Page to tell if the process was called. I think that the process is not called because the page is not sent when the user clicks on the link to the export. It is purely a guess.

    What I tried:

    Working with just the first report, I created a page element hidden in the region of the report and created a calculation before heading for the region ID.

    SELECT region_id
    FROM   apex_application_page_regions
    WHERE  application_id = :APP_ID AND
           page_id = :APP_PAGE_ID AND
           region_name = 'My First Report Region'
    

    Then on the wording of the link for the link export in the attributes report I put:

    < a href = "f? "p = & APP_ID.:124: & SESSION.: FLOW_EXCEL_OUTPUT_R & P124_ESSCSD_REGION_ID._en - us" > Export CSV - my first data reports < /a >

    The Condition, that I used in the process of the Page is:

    Point process: submit now - after calculations and Validations

    PL/SQL -: REQUEST = FLOW_EXCEL_OUTPUT_R & P124_ESSCSD_REGION_ID._en - us

    of course, that didn't work so I tried it - "FLOW_EXCEL_OUTPUT_R" | & P124_ESSCSD_REGION_ID. | "_en - us

    and I tried it - "FLOW_EXCEL_OUTPUT_R" | : P124_ESSCSD_REGION_ID | "_en - us

    None of which worked.

    SO, can someone help me with a solution called a process to insert the data in the report, when the Export link is called?

    What information can I I provide/clarify?

    Thank you

    Joe

    Knew that I had seen cela somewhere... Try to watch this blog of Martin D: D'Souza Giffy Martin on Oracle APEX: APEX report download recorder

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • Cannot call a dynamic report link action after dynamic refresh

    I have a shopping car, that I'm trying.  (apex 4.2 database 11 g 2)

    In the basket, I have a link change which performs the dynamic action to open the modal page plugin.   I also have a button on the region to do a region of dynamic action refresh if you modify the cart in modal region.  After the updating of the region, I can no longer click on the link Edit (nothing happens)

    the link is defined as class = "lines" onclick = "return false".

    and lines is a dynamic action of jquery to call the page target in the link for the modal skills builders page.

    I checked the JS console and I saw no errors... any suggestions?

    Thank you

    Scott

    Hello

    When the page is loaded, Jquery listen event trigger on document.ready

    But in your case, when you refreshed your region, the values on the screen are from this point while it was loaded before.

    Go to your dynamic action

    Change extended the event live or dynamic.

    Scope of the event: DYNAMIC or LIVE

  • Questions about the call for a process of a web site

    Question regarding the appeal process.  I'm new to this part of the technology and I don't know that many would know how it works.  We have a Workbench process that must be called from a remote web site.  The process could take a parameter... That is to say an ID.  The process will then query the database and return a Boolean value to the site and then this site might perform a specific operation.   My question is, are there examples out there that someone could provide which can show how this can be done?  What do I need in my site (I don't know how to configure the buttons create OnSubmit processes and very familiar with javascript, html)?  I think that, somehow, it can be done with SOAP or REST?  Thank you very much in advance for any help.

    You just need a form in HTML with elements (for example textbox - string, file - document etc.) with the same name as the name of the process input parameter and the action attribute of the form must be URL REST of process-oriented.

    For example: for a process(short-lived) having REST URL: Http://localhost: 8080/rest/services/WatchedFolder...  with a parameter in the XML and the document as an output variable, we will use the HTML code below:

    Call REST sample endpoint

    http://localhost: 8080/rest/services/WatchedFolder... method = "post" enctype = "multipart/form-data" >

    Chose a file to send to the process.

    file:

    When you click on submit, the output document would be opened in the browser automatically after submitting the form.

    -Wasil

  • JavaScript is not called by the process of PL/SQL

    Hello Experts

    I try to call a javascript function from pl/sql using htp.p process, but javascript does not get mentioned. In fact, my requirement is as follows:-

    I have a report with check boxes. I use apex_application.g_X01.count to loop through the boxes and check the values of the report. If all of the checkboxes are selected, then I want to show a confirmation box so that the user can confirm that they want to go ahead and do the follow-up actions.

    My Javascript function that I placed it in the HTML header and the Body attribute is:-

    function confirm_response()
    {
    var answer = confirm ("test", "Confirm");
    If (response)
    {
    $x('P1_FLAG').value = 'Y ';
    }

    }

    Looks like my pl/sql process, which currently is trying to evoke the javascript: -.

    Start
    IF apex_application.g_f01.count = < < a number > > THEN
    HTP. P ("< script type =" text/javascript"> ');
    HTP. P ('confirm_response()');
    HTP. P ("< /script >" ");
    IF: P1_FLAG = 'Y' THEN
    -Continue with follow-up actions
    ON THE OTHER
    -To get out the process of
    END IF;
    END IF;

    end;

    But when I run the present that it does not work. The confirmation box never appears.

    It does not even if I change the PL/SQL process as below: -.


    Start
    HTP. P ("< script type =" text/javascript"> ');
    HTP. P ('confirm_response()');
    HTP. P ("< /script >" ");
    end;

    Can someone please advice.

    Thank you

    Hello
    >
    It does not meet my needs because I want first of all check if all the boxes are ticked, then only run javascript.
    >

    So how count the boxes checked in JS is the question.

    Continuing to your operation code snippet, you have box f01.

    Modify the script in the HTML header to this

    
    

    See you soon,.

  • the call for a process of apex after a javascript called the same key

    A url button calls a procedure of java script in the header,
    but then I need a process by their Summit to run after that.
    How can I do that.
    Thank you
    Doug

    Hi Doug,.

    A few questions for you...


    1. What features are you trying to reach?

    2. What APEX version do you use?

    3. When you say 'process', do you mean "process Page"?

    There are certainly ways to submit the page and trigger a process page to run via JavaScript, but it would be good to better understand your needs before offering has some solution first.

    Kind regards
    Anthony.

Maybe you are looking for

  • My new iPhone IS will not charge!

    I had just got a new iPhone SE (64 GB of storage) active, and last week it Thursday, May 26.  It took some time to activate and I had to restore, but it seems to have done. Well, just tonight, I had plugged into the wall with the new Lightning cord a

  • Problem with asynchronous call and Forget.vi and MessageBoxW (user32.dll)

    I have a problem.  I want to use the same type of structure as in "asynchronous call and Forget.vi. There is a picture of my (Message Box.vi) VI. The VI expect the 'narrow reference' I select OK or cancel.  This is not the expected behavior.  If I tu

  • System Restore does not work despite the train different restore points

    Despite all the restoration in train points highlighted that it will not restore only get the same attempt to message one another restore point

  • microscope essentials

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Bases of ideas: microsoft cannot install windowsdid does not pass the validation of the genunine You have problems with programs Error messages

  • After the spysweeper program Sidebar gadgets update not load, run or display

    Original title: windows sidebar gadgets Google; How can I do to load and examine correctly as installed on windows vista? I've recently updated my spysweeper program, but now my base that all gadgets do not load and run/display. How can this be repai