How to set value of application item using Java script.

I have created a textbox on page 0, on chnage of textbox i want to set the value of application item.
How to write the code to set & get value of application item.
Thanks,
-Amit

Hello Amit
This would be a great place to start...
JavaScript
Alternatively, APEX 4.0 will make this sort of task declarative.
Kind regards
Simon Gadd

Similar Messages

  • How to set the value of application item using pl/sql in application process

    Hi guys,
    I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of application item in application process. Also i want to know in which type of application process should i use to set the value of application item when a user starts a session. The value of application item varies from user to user.
    Please help.
    I am using apex 4.2
    Regards,
    Waqas

    You can use the application item as bind-variable with its name. ie. your application item is named G_MY_APPLICATION_ITEM, then you can access/set it using :G_MY_APPLICATION_ITEM.
    For example
    BEGIN
        -- assign like a variable
        :G_MY_APPLICATION_ITEM := 'LARRY';
        -- use in a SQL statement
        SELECT WHATEVER_COLUMN
          INTO :G_MY_APPLICATION_ITEM
          FROM MY_TABLE
         WHERE USERNAME = :APP_USER
    END;
    Peter

  • How to set value for Dropdown control using Querystring filter wepart

    Hi,
    I have a dropdown in my customized list form and need to set the value for the dropdown control using query string filter web part.
    I am able to set value for textbox control using Query String Filer web part.
    But, since the dropdown values are not populated on form load, the value is not set for dropdown control.
    How to load the values in dropdown control on form load and set a value using Query String filter webpart?
    Thanks,
    dhijit

    Hi,
    According to your post, my understanding is that you want to filter choice field using Query String Filter web part.
    To filter using query string filter web part, we can set the default value for the choice field in the query string filter web part panel as below, then connect to the list.
    Now it would be filter by the value you have set.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to ungroup the grouped art items using VB Scripting?

    Hi,
    I need to ungroup the grouped items in Illustrator 10 using VB Script.
    Im able to get the count of group items. How to ungroup those items using VB Script.

    @Vimala Lakshmanan – to access tables inside text frames of grouped objects, you need not to ungroup.
    You could use the Group objects and iterate through all page items of the group, single out the text frames and access their Texts object and their Tables object within.
    By starting with a Group object (in the following snippet the group is selected):
    var myGroup = app.selection[0];
    var allPageItemsOfGroup = myGroup.allPageItems;
    for(var n=0;n<allPageItemsOfGroup.length;n++){
        var myObject = allPageItemsOfGroup[n].getElements()[0];
        if(myObject.constructor.name === "TextFrame" && myObject.texts[0].tables.length > 0){
            var myTables = myObject.texts[0].tables;
            for(var t=0;t<myTables.length;t++){
                //Do your stuff here:
                //Just an example line, that fills all cells in a table to "Yellow"
                myTables[t].cells.everyItem().fillColor = "Yellow";
    This snippet also considers nested groups, anchored text frames and nested text frames.
    It does not consider objects in not active states of MultiStateObjects.
    Uwe

  • How can I get selected EXCEL area using java script office API (v 1.0)

    Hello everyone,
    I need to get values of specified area in an excel sheet using java Script Office API. For an example,
    A1:A7 row load into array using JS. 

    And you posted to a C++ forum, not a JavaScript or Excel forum.... why? 
    Visual C++ MVP

  • How to Set Value of page item?

    String dimLayoutNew[][] = new String[3][];
    dimLayoutNew[0] = new String[1];
    dimLayoutNew[1] = new String[1];
    dimLayoutNew[2] = new String[2];
    dimLayoutNew[0][0] = measureString;
    dimLayoutNew[1][0] = strDimension1;
    dimLayoutNew[2][0] = strDimension2;
    dimLayoutNew[2][1] = strDimension3;
    Boolean applyNewLayoutFlag = tableQuery.layout(dimLayoutNew);
    In this Layout,How to set the value of strDimension2 page item to one member of strDimension2?
    thanks!

    what about this - look up the javadoc to get more >info ....You would have to admit, while BI Beans are great, the documentation is a little light.
    int targetHPos[] = targetDataAccess.getEdgeCurrentHPos (2);
    now apply the order to the targethpos as you like...now, once you make your changes to the targetHPos, how does one actually make the change to the Query object (i.e. what method does one need to call to pass the new targetHPos in??) I looked through the JavaDoc and didn't see a SetCurrentHPos or equivalent function in the DataAccess Class. Is there one?
    Also, what role, if any, should the SetCurrentPage method of the query object play if I'm not using it correctly?

  • How to set values in JMS Adapter using Adanced specific Message Attributes

    Hi Frnds,
    in my scenarios i have to add extra header information MQ Message,
    using Adanced specific Message Attributes i defined 7 parameters(Transaction,Environment,shema......) all are type Interger.But i have to set values ( Transaction type,Enviroment,shema....).
    Where i can set values ??
    help me on this...
    Regards,
    Raja Sekhar

    Hi Vijay,
    Thanks for your replay,as per your input i creted dynamic configuration method,
    i taget structure  luks like this
       <Data>
           <Mesage>
                 <gl_update>
                      <header>
                            <ean1>
                            <ean2>
                      </header>
                  <gl_update>
           <Message>
    i written UDF and mapped to header element gl_update,
    but i am getting  below error message in MONI
    SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_ ffjms_</SAP:P1>
      <SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>
      <SAP:P3>on: Cannot create target element /ns0:MT_jms_ _a</SAP:P3>
      <SAP:P4>sync_out/Data/Message/ GLUpdate. Values missi~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_ ffjms_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_jms_ asyncout/Data/Message/ GLUpdate. Values missi~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    i want to know i mapped to UDF to GL_Update is is correct, to which element i have to map.
    i think there is no prob with UDF,its executing ,giving warning messages
    help me on this,
    Regaards
    Raj

  • Setting value of an item using item_id

    howdy,
    You know when you set value of a text or display item using its name, ie:
    :block_name.item_name := 'abc';
    Well, I would like to do the same, but using its item_id.
    Can it be done?
    The reason behind it is that, I have 50 text items on canvas. They all follow some naming convention, and I would like to set their values in some elegant loop, rather than writing a page-long code referencing their :block_name.item_name.
    thanks and kind regards
    mz.

    Would the COPY built-in work for you? For example 50 items called genericItem1, genericItem2, ...
    for i in 1..50 loop
    COPY('new value', 'block.genericItem' || to_char(i));
    end loop;
    Regards,
    Candace Stover
    Forms Product Management

  • How to set Password protection in excel using java

    Dear all,
    I have no idea to write a java program that how to set password protection in excel. Please give me some solution using java tools. Thank a lot!
    Regards,
    kzyo

    Dear Bamkin ,
    I used your code and paste it in my program. The error is as the follow:
    Code:
         stmnt = c.createStatement();
                   String query = "select StudentNumber, Email, New_Email_Address from [Sheet1$] where Len(New_Email_Address) > 0";
                   System.out.println(query);
                   rs = stmnt.executeQuery(query);
                   stmnt.executeUpdate("SET PASSWORD=PASSWORD('Test')");
    Error:
    (Remark: Invalid SQL statement)
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] �����I SQL ���q���G�a����'DELETE'�A'INSERT'�A'PROCEDURE'�A'SELECT' �� 'UPDATE' �B
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3111)
         at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
         at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:288)
         at hk.gov.edb.util.ExcelHandle.updateNewEmail(ExcelHandle.java:414)
         at hk.gov.edb.core.AppMain.doUpdate(AppMain.java:369)
         at hk.gov.edb.core.AppMain$7.construct(AppMain.java:584)
         at hk.gov.edb.util.SwingWorker$2.run(SwingWorker.java:127)
         at java.lang.Thread.run(Thread.java:595)

  • How to set values to unniverse prompts through java

    Hi
    I am using JAVA -BOSDK to access reports from infoview. I have a problem when any universe level prompt is present in the report. I am able to retrieve it through java when i say documentInstance.getPrompts() and when i set values to this prompt by Prompt.enterValues(String[] parameters) and then either save the report or saveAs another report , my new values dont get applied to the prompt. Only previous values get applied to the prompt. I checked doing prompt.getPreviousValues and prompt.getCurrentValues but when i save the doc then new values are not set.
    here is a part of code iam using: the filterlist contains the ConditionFilterDataItems objects which contain the operands,operator and queryObjectName .I have added multiple prompt.getPrevious and current values for debug purpose.
    private static void applyValuesToUniversePrompt( final DocumentInstance doc, final List filterList )
            final DataProviders dps = doc.getDataProviders() ;
            final DataProvider dataProvider = dps.getItem( 0 ) ;
            final Query query = dataProvider.getQuery() ;
            Prompts newPrompts = doc.getPrompts();
            Prompt newprompt = newPrompts.getItem( 0 );
            newprompt.getPreviousValues();
            newprompt.getCurrentValues();
            final ConditionContainer conditioncont = (OMConditionContainer) query.getCondition() ;
            ConditionFilterDataItem conditionFilterDataItem = null ;
            final Map promptMap = generateInstanceMap( doc ) ;
            //Prompt [] promptArr ;
            for( int i = 0 ; i < filterList.size() ; i++ )
                conditionFilterDataItem = (ConditionFilterDataItem) filterList.get( i ) ;
                final String [] operands = conditionFilterDataItem.getFilterOperand() ;
                PromptsImpl univPrompts = (PromptsImpl)doc.getPrompts();
                Prompt [] promptArr = new Prompt[univPrompts.getCount()];
                for(int k= 0;k< univPrompts.getCount();k++)
                     promptArr[k] =(Prompt) univPrompts.getItem( k );
                if(univPrompts.getCount()==0)
                    promptArr=null;
              if(promptArr!=null)
                for( int j = 0 ; j < promptArr.length ; j++ )
                    final Prompt prompt = promptArr [j] ;
                    final String promptName = prompt.getName() ;
                    final Prompt currentPrompt = (Prompt) promptMap.get( promptName ) ;
                    if( operands [j] != null )
                        currentPrompt.getPreviousValues();
                        currentPrompt.getCurrentValues();
                        currentPrompt.removeValues( currentPrompt.getPreviousValues() );
                        currentPrompt.enterValues( convertStringToArray( operands [j] ) ) ;
                        currentPrompt.getPreviousValues();
                        currentPrompt.getCurrentValues();
                        doc.setPrompts();
                        newPrompts = doc.getPrompts();
                        newprompt = newPrompts.getItem( 0 );
                        newprompt.getPreviousValues();
                        newprompt.getCurrentValues();
            //doc.setPrompts() ;
            doc.refresh();
            doc.save();
            newPrompts = doc.getPrompts();
            newprompt = newPrompts.getItem( 0 );
            newprompt.getPreviousValues();
            newprompt.getCurrentValues();
           // dataProvider.runQuery() ;
            doc.refresh();
            doc.saveAs( "universePrompt2",7148,null,null ) ;
             doc.closeDocument() ;
    private static Map generateInstanceMap( final DocumentInstance document )
            final Map promptMap = new HashMap() ;
            final Prompts prompts = document.getPrompts() ;
            int count ;
            if( prompts != null )
                count = prompts.getCount() ;
                for( int i = 0 ; i < count ; i++ )
                    final Prompt prompt = prompts.getItem( i ) ;
                    promptMap.put( prompt.getName(), prompt ) ;
            return promptMap ;

    Hi Shruti,
    Can U kindly refer this [thread|BusinessObjects Enterprise Java Software Development Kit (SDK) ??; and reply back.
    Would appreciate your efforts !!!

  • Get item value of hidden item in java script on standard report

    I've a report with following query:
    select "ROWID",
    "GTEMPDETAILID",
    "GTEMPID",
    "NORMTEXT",
    "ITEMTYP",
    "ITEM",
    "BEMERKUNG"
    from "#OWNER#"."ALAVIS_GTEMPDETAILS"
    Item GTEMPDETAILID is hidden (set in column attributes).
    I defined an onclick event in the report template to set the value of GTEMPDETAILID into a Page item. This works, if the GTEMPDETAILID is not hidden. But how can I get the value of an hidden item in javascript?

    I am guessing this hidden value is not a protected item because youre manipulating the value. How about setting is a textfield but inside the "HTML form element" property, specify style="display:none;" or you can nest <script type="text/javascript">$x_Hide("ID_OF_TEXTFIELD");</script> in the page somewhere...
    Question, have you tried using $x_Value('ID_OF_ITEM','VALUE_OF_ITEM') ? this is APEX javascript API
    you can also use $x('ID_OF_ITEM') to retrieve DOM object, or $v('ID_OF_ITEM); to retrieve item values.
    Let me know if you need additional assistance.
    Edited by: srbonham1 on Jul 27, 2012 4:31 PM

  • HOW TO SET UP PARTNER APPLICATION TO USE SSO OUTSIDE OF PORTAL

    If anyone knows how Portal switches context to run as the db user mapped to the lightweight schema and how it knows the db schema password please let me know.
    Should you have any queries please do not hesitate to contact me on 07775 896738.
    From document Oracle Portal Security Overview on PortalStudio.oracle.com:
    In Single Sign On mode (EnableSSO=Yes in the DAD), mod_plsql determines the name of the light-weight user and mapped database schema by calling
    WPG_SESSION_PRIVATE.GET_LW_USER and WPG_SESSION_PRIVATE.GET_DB_USER respectively.
    ** These calls are done using the Portal Schema (PORTAL30) and Portal schema password **
    mod_plsql then executes the procedure in the requested URL by using the N-Tier Authentication feature to connect to the database as the user returned from
    WPG_SESSION_PRIVATE.GET_DB_USER. ..... Note that N-Tier Authentication requires all schemas to be used for Portal user mappings to be granted 'connect
    through' privleges to the Portal schema (PORTAL30).
    The WWCTX packages are also used.
    So this is how it works with standard Portal
    - the document states that the WPG_SESSION_PRIVATE package is only accessible to the Portal schema
    - but I checked and it is also available to PORTAL30_SSO
    SQL> desc WPG_SESSION_PRIVATE
    PROCEDURE CREATE_SESSION
    Argument Name Type In/Out Default?
    P_COOKIE_NAME VARCHAR2 IN
    FUNCTION GET_DB_USER RETURNS VARCHAR2
    FUNCTION GET_LW_USER RETURNS VARCHAR2
    PROCEDURE GET_SESSION_INFO
    Argument Name Type In/Out Default?
    NUM_PARAMS NUMBER OUT
    PARAM_NAMES TABLE OF VARCHAR2(32000) OUT
    PARAM_VALUES TABLE OF VARCHAR2(32000) OUT
    PROCEDURE RESET_SESSION
    Argument Name Type In/Out Default?
    P_COOKIE_NAME VARCHAR2 IN
    In my case only the Login Server (PORTAL30_SSO) is going to be used/installed
    - the SAMPLE_SSO_PAPP application will only work if the DAD used to access is it set to use Basic authentication, i.e. the actual integration with the Login Server
    is done in the sample application code calls, stored in the database
    - when a DAD has enableSSO=yes it automatically accesses Portal (PORTAL30) packages to implement N-Tier authentication
    I'm currently testing:
    1. Configuring the SAMPLE_SSO_PAPP sample as documented with a DAD with Basic authentication
    2. Amending the ssoapp procedure to set context to another (db) user on successful authentication:
    wwctx_api.set_context (
    p_user_name => 'SCOTT',
    p_password => 'TIGER' );
    3. If this works then set_context with get_lw_user instead
    I have now amended the ssoapp procedure as follows to print out
    1. The userid entered when the login box is presented
    2. The Database user which the Portal Lightweight user is mapped to
    3. The Lightweight user Portal has used for authentication
    Amendments to papp.pkb:
    (ssoapp procedure, declare db_user_info and lw_user_info as VARCHAR2 in declare section)
    htp.p('Congratulations! It is working!<br>');
    db_user_info := wwctx_api.get_db_user;
    lw_user_info := wwctx_api.get_user;
    htp.p('User Information:' || l_user_info || '<br>');
    htp.p('DB User Information:' || db_user_info || '<br>');
    htp.p('LW User Information:' || lw_user_info || '<br>');
    The following shows the interesting results from my testing:
    - if the user owning the sample_sso_papp package is PORTAL30_SSO then the call to wwctx_api.get_db_user succeeds
    - if the user owning the sample_sso_papp package is a non-portal schema e.g. SSOAPP below the call to wwctx_api.get_db_user generates a User Defined exception
    Steps to test:
    Created new schema SSOAPP on the database
    - edited it in Portal and checked the use this schema for Portal users checkbox
    - created new Lightweight user SSO_LW in Portal, mapped it to SSOAPP schema
    - created new Lightweight user SSO_SCOTT in Portal, mapped to SCOTT schema
    - loadjava -user ssoapp/ssoapp@portal30 SSOHash.class
    - sqlplus portal30/portal30@portal30
    @provsyns ssoapp
    - sqlplus ssoapp/ssoapp@portal30
    @loadsdk.sql
    @loadpapp.sql
    Created DAD with basic authentication SAMPLE_SSO_PAPP
    - username: ssoapp
    - default home page: sample_sso_papp.ssoapp
    Registered the Sample SSO Partner Application with the Login Server and ran regapp.sql
    Commented out the calls to get_db_user in papp.pkb to avoid exception
    - called http://<server>/pls/sample_sso_papp
    - logged on as SSO_LW/sso_lw
    - got output:
    Congratulations! It is working!
    User Information: SSO_LW
    LW User Information: PUBLIC
    So the Portal lightweight user is not returned as SSO_LW
    if anyone knows why the Lightweight User in my test is returned as PUBLIC not SSO_LW
    Best Regards
    MIchael

    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • How to set schedule task in windows using java code

    Hi,
    i want to set the schedule task in windows os using the java code can any one help me on that
    can any one thinks i need to wright a dll file for that which set the schedule task for me which dll i can use in my java code.
    thanks in advance.

    Maybe this will help you?

  • How to set values to bpel variables from Java

    I have a java class to create files and populate some contents into it. On success it returnes "File Created"
    I used the following code to achieve it :-
    WriteFiles objWriteFiles=new WriteFiles();
    String para=((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable","payload","/client:FileTestProcessRequest/client:HO_ORG_ID")).getFirstChild().getNodeValue();
    String result=objWriteFiles.writeHeaderInfo(para);
    (writeHeaderInfo is a method in my java class)
    addAuditTrailEntry(result);
    I works fine..Now I want to assign this reult value to a bpel variable .. I tried doin it like below:-
    setVariableData("outputVariable","payload","/client:FileTestProcessResponse/client:result" , result)
    but its not working...I get a fault ...
    Can anyone help me out...
    Thanks,
    Githa.R.S

    In this example :
       <!-- Invoke the EmployeeStatus Java class instead of web service -->
       <bpelx:exec name="invokeJavaExec" language="java" version="1.4">
          <![CDATA[
             EmployeeStatus e = new EmployeeStatus();
                String firstName = ((Element)getVariableData(
                                 "EmployeeTravelStatusRequest", "employee",
                                 "/employee/FirstName")).getNodeValue();
                String lastName = ((Element)getVariableData(
                                   "EmployeeTravelStatusRequest", "employee",
                                   "/employee/LastName")).getNodeValue();
                String empStatus = e.getTravelStatus(firstName, lastName);
                addAuditTrailEntry("Employee status is: " + empStatus);
                setVariableData("EmployeeTravelStatusResponse", "travelClass",
                             "/travelClass", empStatus);
          ]]>
       </bpelx:exec>they dont use namespaces in the xpath-expression, can you try that ?

  • How to set firefox to no proxy using a script on OS X 10.8.5

    I would like to push out a script to set FireFox to No Proxy.

    Please continue in [https://support.mozilla.org/en-US/questions/1016067] Locking duplicate

Maybe you are looking for