How to pass a value to javascript from flash using externalinterface

hi,
i'm currently trying to call a javascript function and pass values to it. but i'm not really familiar in using the addcallback since i only tested on calling a function from flash without passing anything to the function.
Basically, i'm going to retrieve the values of a node from xml.
and then i will assign those values to a variable in flash.
now what i'm going to do next is pass this value to a javascript parameter..is it done using externalinterface?
Could anyone give me an example.
I just need to throw the value to the javascript function parameter and no return values to the actionscript.
The event is that whenever an image is click, the corresponding value for each image is passed to the javascript function.
here is my unfinished script.
function imageClicked(e:Event):void {
    for each (var imageURL:XML in xml.images.link_to)
        ExternalInterface.call("TestButton",imageURL);
thanks so much in advance.

first, it seems that the 'TestButton' funciton in JS will be called several times when an image is clicked - for each loop in the 'for each' loop you wrote.
second, in order to test the communication between AS and JS, try starting with something simple, like -
ExternalInterface.call('alert', 'OK');
if this doesn't work try tracing the ExteranlInterface.available property/
if it does work, place an alert within the 'TestButton' in the JS code, to see its actually being called.
and so forth...
good luck,
eRez

Similar Messages

  • How to pass _ti value to javascript's window in Destination URI of Button

    How to pass _ti value to javascript's window in personalization's Destination URI of  a Button.
    In Self-Service HR, under my benefit's final confirmation page, I added a new button,
    when clicked would do a javascript alert saying "You have successfully completed your 2008 Benefit Enrollment Process". After clicking ok button, it takes to a printable page.
    Here is my code in the Destination URI field
    javascript:onClick=alert('You have successfully completed your 2008 Benefit Enrollment Process'); window.location='OA.jsp?page=/oracle/apps/ben/selfservice/enrollment/webui/EnrlConfPG&retainAM=Y&OARF=printable';
    The alert works but after clicking ok, I get error.
    Looks like it is expecting ti value in the URL and if I pass ti value like this, it works
    window.location='OA.jsp?page=/oracle/apps/ben/selfservice/enrollment/webui/EnrlConfPG&retainAM=Y&OARF=printable&_ti=800699419'
    But where do I get the real ti value? instead of hard-coded value, as ti is not constant and it changes for each login or session
    ERROR was:
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:597)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1134)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2297)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1710)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.lang.NullPointerException
         at oracle.apps.ben.selfservice.enrollment.webui.ConfirmationCO.processRequest(ConfirmationCO.java:158)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1134)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2297)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1710)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    java.lang.NullPointerException
         at oracle.apps.ben.selfservice.enrollment.webui.ConfirmationCO.processRequest(ConfirmationCO.java:158)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1134)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2297)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1710)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:501)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:422)
         at oa_html._OA._jspService(_OA.java:88)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:98)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    Please help!
    Thanks

    Burkepm,
    Two things:
    1)Don't use .showModalDialog api of MSDN library, because its only applicable to modal dialog pages in IE.This api won't work on any other browser. Moreover,u will need to add
    < base target="_self " />
    under <head> tag of pop up page. This is required because imodal window api of javascript provided in MSDN would not be able to recognize its parent window with out this.
    So,its not possible to close the pop up window and submit data to the base page form by submitting the page when we close the pop up.
    You can OAF js function for openeing the pop up window.
    2)Secondly, there is way to invoke js pop window function without setting profiles I have mentioned in my blog.This is basically through bound values, for ehich url is genaradted dybnamically, so there is no MAC key url validation.
    Here is the code u need to use this code in process request.:
    import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
    import oracle.apps.fnd.framework.webui.OABoundValueEmbedURL;
    OAButtonBean btn = (OAButtonBean)webBean.findChildRecursive("<button item id>");
    String page= "/xxx/oracle/apps/XXX/abc/webui/xxxPg&retainAM=Y";
    String destURL = APPS_HTML_DIRECTORY + OAWebBeanConstants.APPLICATION_JSP + "?"+ OAWebBeanConstants.JRAD_PAGE_URL_CONSTANT+ "=" + page;
    OABoundValueEmbedURL jsBound = new OABoundValueEmbedURL(btn,"openWindow(self, '", destURL, "' , 'longTipWin', {width:"+900+", height:"+500+"}, true); return false;");
    btn.setAttributeValue(oracle.cabo.ui.UIConstants.ON_CLICK_ATTR, jsBound);
    I hope this helps.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to pass dynamicaly values :new.COLUMN_NAME from TRIGGER?

    Hello folks,
    I have 1 configuration table, which stores information about other table's columns in case when special validation to that column should be performed by validation process.
    Then I need to create a before insert, update trigger for validated table (which record exists in above mentioned table) which calls validation process. Into validation process must be passes newly inserted VALUE from column, which is defined in configuration table. How to do this?
    Here is settings, which explains more in detail what I'm trying to do:
    1. Configuration table:
    create table validation_tables
      OBJECT_ID                NUMBER        NOT NULL,
      TIMESTAMP                DATE          DEFAULT CURRENT_TIMESTAMP NOT NULL,
      TABLE_TO_VALIDATE        VARCHAR2(30)  NOT NULL,  -- name of table whoch should be validated
      COLUMN_TO_VALIDATE       VARCHAR2(30)  NOT NULL,  -- column from validated table
      COLUMN_LINKED            VARCHAR2(30)  not null,   
      TABLE_DESCRIPTION        VARCHAR2(300)
    );2. Insert 1 record into above table:
    insert into validation_tables
    values (next_object_id, current_timestamp, 'TK_TEST_OBJECT_NOTE','NOTE','OBJECT_NOTE_TYPE', 'Testing Note Type table - 1st field');
    commit;3. create TK_TEST_OBJECT_NOTE table
    create table TK_TEST_OBJECT_NOTE
      OBJECT_ID         NUMBER        NOT NULL,
      TIMESTAMP         DATE          DEFAULT CURRENT_TIMESTAMP NOT NULL,
      OBJECT_NOTE_TYPE  number not null,
      NOTE              varchar2(500),
      NOTE2             varchar2(500)
    );4. package which will perform some validation (at this stage only validation function calling is important)
    create or replace package api_validate is
       function validate_field (pv_value_to_validate varchar2, pv_linked_object_number number) return varchar2;
    end api_validate;
    create or replace package body api_validate is
      function validate_field (pv_value_to_validate varchar2, pv_linked_object_number number) return varchar2
      is
      begin
        dbms_output.put_line('pv_value_to_validate    :'||pv_value_to_validate);
        dbms_output.put_line('pv_linked_object_number :'||pv_linked_object_number);
        return '-1';
      end;
    end api_validate;5. before insert update trigger for TK_TEST_OBJECT_NOTE => this must be modified
    create or replace trigger VAL#BI#TK_TEST_OBJECT_NOTE
    before insert or update on TK_TEST_OBJECT_NOTE
    for each row
    declare
      cursor c is
        select column_to_validate, column_linked
          from validation_tables
          where TABLE_TO_VALIDATE = 'TK_TEST_OBJECT_NOTE';
      l_valid varchar2(250);
      l_value_to_validate varchar2(4000);
      l_validated_obj_number number;
      cmd varchar2(250); -- command
    begin
      for x in c loop
        dbms_output.put_line('x.column_to_validate:'||x.column_to_validate||' x.column_linked:'||x.column_linked);
        cmd := 'begin
                   l_value_to_validate := :new.'||x.column_to_validate||';               -- << need to assign value based on configuration table ("validation_tables")
                   l_validated_obj_number := :new.'||x.column_linked||';
                end;';
        dbms_output.put_line(cmd);
        EXECUTE IMMEDIATE cmd;
        --l_value_to_validate := :new.NOTE;                                     -- if configuration "validation_tables" table wouldn't be in use, then I would use easily this
        --l_validated_obj_number := :new.OBJECT_NOTE_TYPE;
        dbms_output.put_line('l_value_to_validate:'||l_value_to_validate);
        dbms_output.put_line('column_linked VALUE:'||l_validated_obj_number);
        l_valid := api_validate.validate_field(l_value_to_validate, l_validated_obj_number);
        --l_valid := '-1';
        if l_valid <> '-1' then
           raise_application_error(-20001, l_valid);
        end if;
      end loop;
    end;
    /6. Try to insert into TK_TEST_OBJECT_NOTE
    insert into TK_TEST_OBJECT_NOTE
    values (next_object_id, current_timestamp, 54321,'Some TEST text for Note 1','Note 2 text');7. Expected output for step 6:
    in dbms_output:
    x.column_to_validate:NOTE x.column_linked:OBJECT_NOTE_TYPE
    pv_value_to_validate    :Some TEST text for Note 1
    pv_linked_object_number :54321
    and then:
    update validation_tables vt
      set vt.column_to_validate = 'NOTE2'
    where vt.table_to_validate = 'TK_TEST_OBJECT_NOTE';
    again the same insert from 6:
    insert into TK_TEST_OBJECT_NOTE
    values (next_object_id, current_timestamp, 54321,'Some TEST text for Note 1','Note 2 text');
    expected output:
    x.column_to_validate:NOTE2 x.column_linked:OBJECT_NOTE_TYPE
    pv_value_to_validate    :Note 2 text
    pv_linked_object_number :54321So my problem is with trigger in above section 5. I need to pass VALUE into called "api_validate.validate_field" function based on settings in configuration "validation_tables" table.
    Any idea?
    Thanks,
    Tomas

    hmm it seems like the only option would be hardcodeing it for every column in table - what I really don't like very much :-(
    create or replace trigger VAL#BI#TK_TEST_OBJECT_NOTE
    before insert or update on TK_TEST_OBJECT_NOTE
    for each row
    declare
      cursor c is
        select column_to_validate, column_linked
          from validation_tables
          where TABLE_TO_VALIDATE = 'TK_TEST_OBJECT_NOTE';
      l_valid varchar2(250);
      l_value_to_validate varchar2(4000);
      l_validated_obj_number number;
      cmd varchar2(250); -- command
    begin
      for x in c loop
        dbms_output.put_line('x.column_to_validate:'||x.column_to_validate||' x.column_linked:'||x.column_linked);
        if x.column_to_validate = 'NOTE' then
           l_value_to_validate := :new.NOTE;
        elsif x.column_to_validate = 'NOTE2' then
           l_value_to_validate := :new.NOTE2;
        end if;  
        if x.column_linked = 'NOTE' then
           l_validated_obj_number := :new.NOTE;
        elsif x.column_linked = 'NOTE2' then
           l_validated_obj_number := :new.NOTE2;
        elsif x.column_linked = 'OBJECT_NOTE_TYPE' then
           l_validated_obj_number := :new.OBJECT_NOTE_TYPE;      
        end if;
        l_valid := api_validate.validate_field(l_value_to_validate, l_validated_obj_number);
        --l_valid := '-1';
        if l_valid <> '-1' then
           raise_application_error(-20001, l_valid);
        end if;
      end loop;
    end;
    /

  • How to pass a value and call SE38 program using SUBMIT statement

    Hello Friends
    I am trying to write a batch program in SE38, that calls other SE38 Programs.
    I don't want to use Parameter command to see the value on screen.
    All I want is to send a range of date (ToDate & FromDate) and generate different reports satisfying this date range condition.
    Can some one please help me with this. I would really appreciate it.
    I have tried the command SUBMIT with options of filling the input fields of the subsequent programs but I don't want to do this.
    I want all the sub programs to be called one after another and the reports generated using the date varialbles I send from the main program.
    I don't want to use se37 functions because of the client's request.
    Any help will be highly appreciated.
    Tks
    Ram

    Yes I am using SUBMIT command but I was not using the right options with the SUBMIT command and once I used the right options, it worked.
    Tks
    Ram

  • How to pass src value into img tag in ADF

    Hi,
    My Dev : 11.1.2.3.0
    How to pass row values into <img> tag.,I used the below code but it's taking empty.,
    I tried both ways like #{row.CdFilePath}   and   ${row.CdFilePath}
    <af:iterator var="row"
                      value="#{bindings.xxx.collectionModel}"
                     id="i2">
         <img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
    </af:iterator>
    Please tell me any other option is there..
    Thanks

    This works if you use a normal table so I guess it should work here too.
    Are you sure the el #{row.CdFilePath} return something?
    Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
    Should the src property not be enclosed with " instead of your '?
    Timo

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

  • How to pass a value from the report to a form ( BIT OF URGENT ).

    Hi,
    I had created a "Form on a Table with Report" on the report I had remove the edit link and set one of the column feilds that functionality. Now I want to know how to pass that value that is clicked ( having hyper link ) on to the form where it runs a SQL query and then displays the reuslts on the form.
    Illustrating with an example.
    I am having these following columns on the report ( these are the results for the join statement )
    JOBNUM JOBNAME DEPTNUMBER SAL EMPNO LNAME FNAME
    In the above JOBNUM is having Hyper link as I removed the edit image.
    Now this is area I am having problem. When the user clicked on the JOBNUM then on form it should display 20 other columns( pulled from 5 other tables ) which are related to that particualr JOBNUM.
    Anybody give me a solution in which area I have to include my SQL statement and how to pass that selected value to that SQL statement.
    Cheers,
    Krishna

    Hi Ron,
    I am doing exaclty what you have suggested me but no luck. I started changing the DEMO_CUSTOMERS application to my requirements.The report is working fine and on the report I have created a page attribute to the Hyper linked column and linked that to the page 2 and assign that attribute with #JOBNUM#.
    I am able to pass that value on to form when I click on the JOBNUM. But the problem is I am not able to pass that value into the SQL query so that my query pulls 20+ columns on to the Form ( which is second page ).
    Small clarification... On the form region it is said FORM NAME and type is HTML is that is the way the APEX was designed or does it need to say region type as FORM.
    Thanks for your help in advance.
    Cheers,
    Krishna.

  • How to pass the value from Sub report to main report

    I have un report(mainreport) within a subreport(subreport).
    With reporting services, how to pass the value from Sub report to main report?
    thanks

    Hi Alebet,
    With reporting services to pass values from sub report in to main report is not supported directly.
    But there are some workarounds through which you can get this .
    There are two ways to get this.
    1- Put your sub report query into some table. i mean to say through the subreport query get some temporary table.
    2- Using this temporary tables data write some Scala function in the data base.
    3- Now in your main report query return this scala function as a column.
    4- Extract the column value where ever you want in your main report which is getting calculated from the subreport query. so you will be getting the values returned from the subreport in the main report.
    This will definitely work fine as i have done some report in this way.
    Another way of doing is that
    1- prepare another data set with the same query as in sub report in the data tab.
    2- then refer this 2nd dataset in your main report .
    But better way will be the top one.
    Anyway please let me know if you get the solution.
    Thanks
    Mahasweta

  • How to pass a single quote in a URL using Javascript

    Can someone tell me how to pass a single quote in a URL using Javascript. I have created a Javascript funciton in which I pass several column values from an APEX report.
    The URL for the report link I am using is "JAVASCRIPT:passBack('#EMP_ID#','#Name#','#e-mail#')"
    The problem occurs with the Name and e-mail columns contain a single quote (i.e. James O'Brien)

    Thank you Saad, that worked.
    Since I built the report using type 'SQL Query (PL/SQL function fody returning SQL query)' I had to add some additional quotes to get it to work.
    i.e.
    replace(EMP_EMAIL_NAME,'''''''',''\'''''')
    or
    replace(EMP_EMAIL_NAME,chr(39),''\'''''')
    Thanks for the help,
    Jason

  • How to Pass Click Value to DB using Java

    How to Pass Click Value to DB using Java and display tat
    clicked value row data in flex
    i have created connection with Sql Server using java and drew
    pie chart from values fetched from XML file created by Java
    wat i need is when i click pie chart region (widget) i should
    display a alert by giving value of particular widget name and Value
    from Database and display in Flex Alert

    Use AddResource to add Javascript in your BackingBean Code and pass the value to your javascript code.
    JSCookMenu and other dynamic adding of javascript to a JSF-JSP page is done using AddResource....

  • How to pass a value to a bind variable in a query report in oracle apex

    Hi Guys,
    I have requirement to send weekly reports via email to some users. The users should receive their own records in the report. The user details is stored in a table. What I am planning to do is to create a report query in oracle apex to generate the report and then run a function/procedure via a scheduler to email the report to respective users. Now my query is ............. is it possible to pass a value (user name) to the report query to pull records of only that user? I know we can have bind variables in the report query but I have no idea how to pass a value for bind variables from a function/procedure.
    Can anyone help me on this issue or suggest a better approach?
    Thanks,
    San

    You need to use dynamic sql
    But please keep in mind that since you're using Oracle you may be better off posting this in some Oracle forums
    This forum is specifically for SQL Server
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Pass a Value to Variable from the unix environment in ODI (ELT)

    Hi
    i am very new to ODI environment.
    i want know how to pass a value to variables in oracle data integrator from unix environment.
    Example:
    Variable name : Sales
    for variable name sales i want to pass the value from unix environment.
    Regards,
    Raj
    Edited by: user11137587 on Aug 19, 2009 6:26 AM

    Work Around !
    You can execute OS commands using Jython script. Probably you need to flush your enviornment variables value into a file using jython script and then read those value into ODI variable from the file.
    BUt may I know why you want to read environment variable vaules in ODI, Dont you think this will make your application less portable
    Regards,
    Amit

  • Pass a value in textbox from choose from list.

    Hi SAP experts,
    How to pass a value from a choosefrom list into textbox.?
    i'd created a form then in my one textbox, i inserted a choosefrom list. im trying to pass a CardCode but im getting a Bad Value ERROR.
    whis is my code in Creating a textbox with choosefrom list
    oItem = oForm.Items.Add("txtCFrom", SAPbouiCOM.BoFormItemTypes.it_EDIT)
                oItem.Left = 40
                oItem.Width = 80
                oItem.Top = 10
                oItem.Height = 14
                oItem.Enabled = True
                'Set txtCFrom
                oForm = SBO_Application.Forms.GetForm("60004", 0)
                oForm.DataSources.DBDataSources.Add("OCRD")
                Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
                oCFLs = oForm.ChooseFromLists
                Dim oCFL As SAPbouiCOM.ChooseFromList
                Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                oCFLCreationParams.ObjectType = "2" 
                oCFLCreationParams.UniqueID = "DVDCFL"
                oCFL = oCFLs.Add(oCFLCreationParams)
                oEditText = oItem.Specific
                oEditText.DataBind.SetBound(True, "OCRD", "CardCode")
                oEditText.ChooseFromListUID = "DVDCFL"
    AND this is my code in ITEM  PRESSED - when choosing a BP
    Select Case pVal.BeforeAction
                    Case False
                        Select Case pVal.FormType
                            Case "60004"
                                oForm = SBO_Application.Forms.GetForm("60004", 0)
                                Select Case pVal.ItemUID
                                    Case "txtCFrom"
                                        Select Case pVal.EventType
                                            Case BoEventTypes.et_CHOOSE_FROM_LIST
                                                oCFLevent = pVal
                                                Dim oDataTable As SAPbouiCOM.DataTable
                                                oDataTable = oCFLevent.SelectedObjects
                                                oItem = oForm.Items.Item("txtCFrom")
                                                oForm.Items.Item("txtCFrom").Specific.value = oDataTable.GetValue(0, 0).ToString
                                                SBO_Application.MessageBox(oDataTable.GetValue(0, 0))
                                        End Select
                                End Select
                        End Select
                End Select
    thanks,

    First create userdatasource.
    frmPayment.DataSources.UserDataSources.Add("AFolder", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
    Second bind the datasource to editText
    fl_DP = frmPayment.Items.Item("fl_DP").Specific
    fl_DP.DataBind.SetBound(True, , "AFolder")
    Third in ChooseFromList event
    frmAmortSched.DataSources.UserDataSources.Item("AFolder").ValueEx = oDataTable.GetValue(0, 0)

  • SSRS How to pass a value for Hidden parameter ?

    Hello,
    I have a SSRS report deployed on the Report server. This report is having an "Hidden" parameter.
    Could someone please guide me, how to pass the value to this internal parameter in each of the following case - 
    1. Report is accessed through a Desktop application/Web application in Report Viewer.
    2. Report is accessed through the Url.
    3. Report is accessed through the Report Manager.
    Any quick help on this is highly appreciated.
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Hi Vinay Pugalia,
    Internal Parameters in SSRS are parameters that are not configurable by the end-user at run-time and values cannot be passed to this type of parameter (when present in the child report) in case of a drill-through report implementation. This
    type of parameter is read-only and not accessible in parent report.
    This varies from a Hidden Parameter, which the user is not prompted to provide, but can still be configured through the URL to the report server.
    So no matter you access the report through report manager, URL or Report Viewer. The passing value to the internal parameter will not work.
    As you have mentioned that I will also suggest you use the hidden parameter instead.
    More details information in this blog for your reference:
    SSRS – Understanding Report Parameter Visibility
    How to pass value to  hide parameter is the same as that of the visible parameter, similar thread for your reference:
    Passing the value in action property of a text box
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • In BADi , How to pass the values between two Method

    Hi Experts,
    We have two methods in BADis. How to pass the value  between two Methods. Can you guys explain me out with one example...
    Thanks & Regards,
    Sivakumar S

    Hi Sivakumar!
    Create a function group.
    Define global data (there is a similiar menu point to jump to the top include).
    Create one or two function modules, with which you can read and write the global data.
    In your BADI methods you can access the global data with help of your function modules. It will stay in memory through the whole transaction.
    Regards,
    Christian

Maybe you are looking for