Call vbscript from Apex button

I have added a vbscript to the header section of my page and I'm trying to call this from a button. Is this possible? Can anyone post an example of how this would be done. I've tried calling from the URL redirect section, along with many other things and can't get anything to work. I'm not sure if I added in the header wrong or if I'm calling it wrong.
Thanks

What about placing outputs from the procedure to fields on the form?
Here is the procedure I have created:
procedure vatTotal (Order_no IN number,Total2 OUT number)
AS
CURSOR c_vatTotal is
select order_line.quantity, gre_product.cost from ord, gre_product, order_line where ord.order_no = order_line.order_no AND
gre_product.prod_no = order_line.Product_no;
Total number;
begin
Total:= 0;
for c_record in c_vatTotal loop
Total := Total + c_record.quantity * c_record.cost;
end loop;
Total2 := Total;
end;
I believe this is correct. It compiles.
I tried using Total as an out parameter but received the "duplicate fields in RECORD, TABLE or argument list are not permitted" error.

Similar Messages

  • Calling ASP script from APEX button passing Bind variable

    I am looking for some examples or best form for calling asp script from apex button that will pass apex bind variable to asp script to process.
    Thanks,s
    Bob

    I am surprised by the degree of no replies. I have solved this by using asp redirects such as:
    Response.Redirect("test.aspx?UserName="&user)
    My formulated solution contains a page with a manually built interactive report. I have a number of bind variables at the top of the reoprt where users can query the information they want based on desginated database columns for this particular report. Once they have the "manual" interactive report displaying what they want, they click a button where a asp script is called with parameters passed that calls a Java based Crystal Reports plugin with the called correspnding report displayed with passed parameters.
    Works like a charm!
    This solves our reporting needs without having to resort to Bi Publisher (much too expensive) and other third party applications that kinda indicate it can work with apex but provide limited help or best form for doing so.
    Bob

  • Run external exe program from APEX button

    Hi,
    I want to run external programs like EXCEL or Word called from an APEX button.
    Does anyone hav an idea?
    Regards,
    Siegwin

    Hi Siegwin,
    To my knowledge, there are two possibilities running apps on the client side: Either user IE with ActiveX or create your own browser and deploy it with the application.
    I did this using the WebKit browser which comes free with the Qute-Framework. It works very well, the only thing I need to do is create a link that starts with os:// to start an external application and hand parameters over. The browser is a minimal browser component, strong enough to run Flash and enabled to interact with the local computer. Deployment of this C++ application is a simple copy to a network device. This approach gave me piece of mind in regard to compatibility issues as well. The browser is a simple window that even don't allow for direct address entering, therefore the Apex-application looks like a normal application then and is unable to connect to any other internet resource other than the APEX applicaiton itself.
    To the others moaning about this security whole: There are situations where you need something like this, fi in intranet environments where you want to enable APEX to interact with the local environment. So I think it's a valid request.
    Best regards,
    Jürgen

  • Calling report from a button based on parameters

    Hi,
    I want to call a report from a custom button based on some parameters. Suppose
    I have a form based on dept table and I have created a custom button which
    should take the value of the selected deptno and pass as a parameter to the
    report to get all the info from the emp table against that deptno.
    Thanks

    Report:
    You need to create a SQL report with a bind variable. Then you can take a look at the call interface from the "Manage" Screen of your report to find out how to pass parameters to it.
    Form:
    To get the required value from the form, make use of p_session in the Custom PL/SQL handler code, then form the URL of the report and call it using <portal_schema>.wwa_app_module.set_target. Take a look at this post: Problems installing 9iAS 9.0.3

  • Call Procedure from a Button

    I am trying to call a procedure from a button that will work out the total of an order and display it in the total field in my master block.
    I am unsure as to how to call the prodcedure from my button. I have written the procedure in the PL/SQL Stored Program Units part like it says in the help file but am now stuck.
    I assume I use a WHEN-BUTTON-PRESSED trigger but what do I write in the trigger?

    What about placing outputs from the procedure to fields on the form?
    Here is the procedure I have created:
    procedure vatTotal (Order_no IN number,Total2 OUT number)
    AS
    CURSOR c_vatTotal is
    select order_line.quantity, gre_product.cost from ord, gre_product, order_line where ord.order_no = order_line.order_no AND
    gre_product.prod_no = order_line.Product_no;
    Total number;
    begin
    Total:= 0;
    for c_record in c_vatTotal loop
    Total := Total + c_record.quantity * c_record.cost;
    end loop;
    Total2 := Total;
    end;
    I believe this is correct. It compiles.
    I tried using Total as an out parameter but received the "duplicate fields in RECORD, TABLE or argument list are not permitted" error.

  • Is there any way to call VBscript from java code

    hi all
    i have a question about calling a VBscript from my java code. can we do that in java? if so, any sample i can look at it. thanks in advance.

    it is not the scripting used in the browser. it is
    the scripting that builds VB program used in MS SQL
    server like the bulk loader. i need to call this
    loader to load xml data into the database.So you have a .vbs file that you want to execute?
    Runtime.getRuntime().exec("cmd.exe /C start " + fileName);
    Where fileName = the path to your .vbs file.

  • Calling javascript from a button

    Good morning everyone!
    I need to add a message box that asks the user a confirmation to delete information. So I want my delete button to call the javascript necessary to confirm the delete and then delete.
    My problem is in calling the javascript. I'm able to do so by using an image for my button and in the image attributes add:
    onclick="javascript:confirmDelete('Are you sure you to delete?');"
    This works perfectly, except for one thing: I don't want to use an image for the button. It doesn't fit with the rest of the application.
    I know it can work, because Oracle is using it on this page:
    http://apex.oracle.com/pls/otn/f?p=37719:8:3069181226556730::NO:::
    So how can I call my javascript from an ordinary button?

    I have a related question:
    How can I access the BROWSER_LANGUAGE in javascript? With my method of calling javascript, I didn't find a good way to pass variables to the function that I call.

  • CALL TCODE FROM MENU BUTTONS IN ALV OOPS

    Hi friends,
      I have a report with ALV GRID display with oops . According to the requirement I have to cretae three buttons in the menu bar which will cal thre different transactions . Cn anyone tell me HOw to call the transaction from a report ? I tried to use set paramteer id but I am not able to get the output . If possible send me some sample code as well .
    Thanks in advance .

    Set up a gui status with your button + its codes.
    than use call transaction commancd within your user_command module (parameter sy-ucomm).
    Rebeka

  • Performance: call packages from APEX is slow

    Hi
    we have a complexe authorization, authentication and policy concept. We have encapsulate a lot of functions into a seperate package. Functions and procedures of this package gets called at different places in three different applications. I know if a package function ie. get's called in a report query it could be very slow because it get's called not one time for one row, it sometimes get's called 5 or 10 times for one row. It's always better to join tables and information into reports.
    Problem is, we have two instances and in one instance, the application is "running". In the other instance, the application is f*****g slow...
    So I read about pinning of packages and problems with session pooling and session cached cursors.
    First question is, what excatly happens if I pin a package into memory and what are the prerequisites to do that? Could this realy improve the performance dramatically?
    Second question is, could there be some problems of session pooling or can we increase the amount of session that could be pooled so that packages get be chached?
    Do you have some more information, links or ideas to increase performance? or caching of packages? or some other tricks like overwriting V(xxx) syntax?
    Thanks in advance!

    Greetings,
    As mentioned in the above post, pinning packages can help with the overhead of packages being loaded and reloaded after being swapped out. If you follow the link and read the blog post, you'll get a good idea of what happens when you Pin a package and how to actually do it.
    But more to the point you need to know where your code is "failing to be performant". Luckily there are a number of things that you can do to pinpoint what portion of the code is slow and why.
    DBMS_PROFILER allows you to get information about the execution of your PL/SQL packages, including how many times a particular line of code was executed and how long it took to run. This is very useful information when trying to diagnose PL/SQL. However DMBS_PROFILER doesn't give you a 100% picture of what is going on, as it lumps the execution of SQL in with the execution of PL/SQL.
    DBMS_HPROF (available on 11g) is similar to DMBS_PROFILER in that it tells you what your code is doing, but it adds the ability to look at the data hierarchically (with parents and children) and to split the execution of PL/SQL from the execution of SQL queries.
    There is an Open Source project called the Instrumentation Library for Oracle (ILO) that allows you to instrument your code and collect data about it's response time as well as capture accurately scoped 10046 trace data. Originally authored at the performance experts at HOTSOS (Where I should say, I used to work), the project is now stewarded by Method-R and continues to be expanded.
    Speaking of 10046 trace, APEX is actually instrumented so that with a small addition to the URL, you can generate a 10046 Level 12 trace of the session that processes and renders a page. Run that through TK-PROF, SQL-DEV or The Method-R/Hotsos Profiler, and you'll see a full accounting of the time taken.
    Another thing you can do is to make sure you're not executing the same code over and over to get the same result. If the result of a particular function or query will be the same for the life of a session, then execute it only once and store the result in a Package Variable. Accessing the package variable is far less overhead than continually executing a query or function even though the result might be cached.
    Although there are myriad approaches to tuning code, it all basically starts with identifying where the problem is. The above methods will definitely help you get to the root cause and once you have something more specific to attack, please let us know and I'm sure many of us would be happy to jump in and help.
    Hope That Helps,
    - Doug Gault -
    http://sumnertech.com/

  • Calling Report from forms button on 10gDS

    Hi,
    I am calling a report from a form. I set destype to cache
    and desformat to html. The report is running fine when i run it in Report Server. But when I try to call it vi button, it gives me a
    "REP-0503: You did not specify the name of the report" error. But it is clearly seen that the name and destination of the report is given in the property pallette.
    Can anybody pls give me a solution??
    Thanx in advance.
    Imtiaz Rahim.

    not sure if there is such an OBE, but you should find documentation about that in the forms documentation. look for info on "RUN_REPORT_OBJECT".
    thanks,
    ph.

  • Call process from a button

    hello,
    I have a question:Is it possible to call and execute a process on a button click?
    LAFOND Romain

    Since the processes are performed by the HTML DB engine, the page has to be submitted to execute it. I think the only way to evade it is to use JavaScript (please correct me if I'm wrong).
    But why do you want to prevent submitting - you can call the submitted page again after processing!
    Bettina

  • How to call OWB Process Flow from APEX?

    Hello.
    I was wondering if there is a way that I can have a OWB process flow kick off from a button in APEX? I know you can have APEX perform PL/SQL upon being clicked, so I am wondering if there is a way that I can do the same for a process flow? We are looking to have a manual kick off for a job and we are trying to use APEX for this. Any information would be great!
    Thank you

    Hi,
    Using SOAP ?if there is a way ... please provide some examples.
    I finished my EDQ process, and now i am trying to find how to call it from APEX
    My web service WSDL is
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header/>
      <soap:Body>
        <dn:request xmlns:dn="http://www.datanomic.com/ws" id="?">
          <dn:record>
            <dn:ID>?</dn:ID>
          </dn:record>
        </dn:request>
      </soap:Body>
    </soap:Envelope>You did not state your Apex version. If you are on 4.x then see
    Creating a Web Service Reference Based on a WSDL
    Cheers,

  • Automation server can't create object when calling a jsp from a button

    Hello,
    I have created the following jsp that allow me to execute an external program that is located on the client side:
    <script language="JavaScript" type="text/javascript">
    <!--
    function execAppli(app)
    var wshShell = new ActiveXObject("WScript.Shell");
    wshShell.Run(app+".exe", 1, true);
    -->
    </script>
    If I call this jsp in a simple html page is works correctly when i call it from a button in apex (3.0) I got the error message Automation server can't create object.
    Any idea ?
    Thanks,
    Claude-Alain

    Hi Claude,
    Just be sure that you really (like really) trust your endusers, because I can see some huge opportunities for exploiting that JavaScript routine you've shown. If you're not taking steps to prevent cross site scripting (search this forum or Google for details on what that is), then it's not beyond the bounds of possibility for someone to do something 'nasty' which would do horrible things to your end users if your executing a program on their client machines without any warning or validation of what that program actually does.
    Sometimes it's best to work backwards from the point of view of....what if you walk into work one morning and find that 400 end users machines have had their hard-drives wiped because the script arbitrarily executes whatever command you pass to it? Then you can perhaps see that what sometimes looks like a good idea might not be such a good idea after all ;)

  • Calling Stored Procedure from APEX window

    Hopefully someone will be able to help me. I have a stored procedure that generates a csv of time worked from our system. When I hard code the values in the procedure and call it from a button, the popup window opens excel and displays the time worked.
    When I call it with session variables, the window opens, but no values are listed for time worked.
    This is the first line of the proc.
    create or replace procedure "PRC_EXP_HOURS_TO_CSV"
    (p_name IN VARCHAR2,
    p_wk_end_dt IN DATE).....
    This is how the button calls the proc
    javascript:popupURL('#OWNER#.prc_exp_hours_to_csv?p_name=&P20513_NAME.,&p_wk_end_dt=&P20513_ACTIVITY_DATE.');
    Both P20513_NAME and P20513_ACTIVITY_DATE show a session status of 'I' so I am not sure what is going wrong here. As stated if I hard code values in the proc for name and '06-APR-08' for date the proc runs.
    Kevin

    Kevin
    Is it possible that :P20513_NAME value has "special" characters (space, comma, etc)?
    If it has then you have to "escape" it or you can get values with V functions in your stored procedure:
    <pre>
    declare
    l_name varchar2(4000);
    l_date date;
    begin
    l_name := v('P20513_NAME');
    l_date := v('P20513_ACTIVITY_DATE');
    </pre>
    Lev

  • Problem when calling BPEL process (WS) from APEX

    I am trying to add a web service call to a BPEL process I have created (tried a few others aswell), but every time I try to add the WDSL file I get the following error:
    *1 error has occurred*
    The WSDL document contains multiple SOAP bindings. Application Express only supports WSDL's with one SOAP binding. Click Create Web Service Reference Manually to continue creating a reference for this service.
    It is a simple BPEL process which works fine when called from the BPEL Console, however I have no success when calling it from APEX.
    Am I doing something wrong, or is there a bug in BPEL/APEX?
    Oracle BPEL Console v10.1.3.1.0
    Apex: 3.2
    The WDSL looks like this:
    <definitions name="BPELProcess9" targetNamespace="http://xmlns.oracle.com/BPELProcess9">

    <types>

    <schema>
    <import namespace="http://xmlns.oracle.com/BPELProcess9" schemaLocation="BPELProcess9.xsd"/>
    </schema>

    <schema>
    <import namespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" schemaLocation="http://xxx:8888/orabpel/xmllib/ws-addressing.xsd"/>
    </schema>
    </types>

    <message name="BPELProcess9ResponseMessage">
    <part name="payload" element="tns:BPELProcess9ProcessResponse"/>
    </message>

    <message name="BPELProcess9RequestMessage">
    <part name="payload" element="tns:BPELProcess9ProcessRequest"/>
    </message>

    <message name="WSAReplyToHeader">
    <part name="ReplyTo" element="wsa:ReplyTo"/>
    </message>

    <message name="WSARelatesToHeader">
    <part name="RelatesTo" element="wsa:RelatesTo"/>
    </message>

    <message name="WSAMessageIDHeader">
    <part name="MessageID" element="wsa:MessageID"/>
    </message>

    <portType name="BPELProcess9Callback">

    <operation name="onResult">
    <input message="tns:BPELProcess9ResponseMessage"/>
    </operation>
    </portType>

    <portType name="BPELProcess9">

    <operation name="initiate">
    <input message="tns:BPELProcess9RequestMessage"/>
    </operation>
    </portType>

    <binding name="BPELProcess9Binding" type="tns:BPELProcess9">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="initiate">
    <soap:operation style="document" soapAction="initiate"/>

    <input>
    <soap:header message="tns:WSAReplyToHeader" part="ReplyTo" use="literal" encodingStyle=""/>
    <soap:header message="tns:WSAMessageIDHeader" part="MessageID" use="literal" encodingStyle=""/>
    <soap:body use="literal"/>
    </input>
    </operation>
    </binding>

    <binding name="BPELProcess9CallbackBinding" type="tns:BPELProcess9Callback">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="onResult">
    <soap:operation style="document" soapAction="onResult"/>

    <input>
    <soap:header message="tns:WSARelatesToHeader" part="RelatesTo" use="literal" encodingStyle=""/>
    <soap:body use="literal"/>
    </input>
    </operation>
    </binding>

    <service name="BPELProcess9">

    <port name="BPELProcess9Port" binding="tns:BPELProcess9Binding">
    <soap:address location="http://xxxx:8888/orabpel/default/BPELProcess9/1.1"/>
    </port>
    </service>

    <service name="BPELProcess9CallbackService">

    <port name="BPELProcess9CallbackPort" binding="tns:BPELProcess9CallbackBinding">
    <soap:address location="http://set.by.caller"/>
    </port>
    </service>

    <plnk:partnerLinkType name="BPELProcess9">

    <plnk:role name="BPELProcess9Requester">
    <plnk:portType name="tns:BPELProcess9Callback"/>
    </plnk:role>

    <plnk:role name="BPELProcess9Provider">
    <plnk:portType name="tns:BPELProcess9"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

    Allow me to reply to my own thread, for the benefit of any others who might want to invoke a BPEL WS from APEX facing the same problem:
    Apex does not seem to like asynchronous BPEL processes so the trick is to make a synchronous BPEL process call the asynchronous BPEL process.

Maybe you are looking for

  • Button in BEx Analyzer

    Hi, I need to use a button in BI 7.0 BEx Analyzer in a workbook with the function similar to the context menu "Back" in BEx. What are the command and parameter settings for this button? Thanks.

  • My macbook pro doesn't recognize my cameras

    I have a 13 months old macbook and it won't show my fuji S5 pro camera when connected by usb cable. Even after I installed the cameras driver, the macbook still doens't reconize it. It just doens't show on the screen. Now I put my memorycards in a ca

  • My matchbook pro keeps restarting

    I find this below kernel message while my matchbook pro restarts? i changed my old Hard-disk and installed new one, the problem was solved for a while then it appeared back again. when it restarts i find my screen the same before it restarts as if it

  • Imac (intel) 2008 24" screen.

    Hi there, I bought my imac (intel) in 2008 along with an Applecare plan which I forgot to register (a complete waste! silly me). Can I register it now? The box is still un-opened? Any suggestions?thanks!

  • Multiple key figures in a report painter or writer

    I would like to bring GL account balances  in the form of a P&L and also bring statistical key figues. I need to perform a formula of dividing the dollar value by the SKF. Is this achievable? The column in the painter does not permit more than one ke