Creating variables using set()

Does the set() function for dynamically creating variables
have a substitute in AS3?
This is a generic example written in AS2:

You're welcome. Until your posting, I didn't know there was
such a thing as set, so as often happens, I learn new things here.
My approach normally would have been along the lines of the = one.
If you're ever wondering about other changes, in the AS3 help
docs you can search on "Migration" and one of the few choices there
is titled as such wrt AS2. It tabulates the status of most of the
AS2 code elements and identifies alternatives for AS3 when
applicable.
Also, there's this offering you might find useful...
http://www.actionscriptcheatsheet.com/downloads/as3cs_migration.pdf

Similar Messages

  • Variables using "sets"

    Hello,
    I need some help about how to do the following: in my abap program I need to access a set of customers. This set of customers can be changed in the future in order to add or remove customers.
    Any idea about how to do using a standard functionality of SAP? I do not want to create any Z table. Is there something like "sets" in SAP? Functional team has told me to store this information as variables using "sets" which will give the ability to add more such Customers when required.
    Thanks

    You can maintain Sets via GS01/GS02 transaction.
    1. Go to GS01 to create a new set.
    2. Give a proper name for the Set Name, Provide the Table Name as KNA1.
    3. On pressing Enter it will ask for the fieldname. Give it as KUNNR.
    4. On pressing Enter, you will get into the maintenance screen.
    5. Maintain the values and press Save button to save the set.
    To access the values maintain thru program,
    1. First get the SET ID using the FM G_SET_GET_ID_FROM_NAME.
    2. Using the SET ID get the values maintained in the set using FM
        G_SET_TREE_IMPORT.
    Hope this helps.
    Reward points for all helpful answers.
    Thanks,
    Balaji

  • Creating measure using set operators in BO Xi 3.0

    Hi All,
    I am trying to create a measure like this in BO XI 3.0 Designer.
    Select count(*) from
    select id from table1 where Name=<Prompt Value>
    INTERSECT
    select id from table1 where Name=<Prompt Value>
    But I don't know how to use set operators in Designer.
    Can someone please help or any pointer would help.
    Thanks,
    Kuldeep
    Edited by: Kuldeep Chitrakar on Apr 2, 2009 4:06 PM

    Create a derived table with same SQL and drag the table into universe pane to create object.

  • Creating variables using for loop

    is there any way in java to create a variable called "xi" using a for loop say:
    for (int i =0; i < 1000000;i++){
      int xi;
    }so I want to create a million of different variable names based on the i... I know this may be a stupid question

    I don't think there is a way to do this. More importantly why do you want to do this? If you dynamically generate 1 million variables, then how will the rest of your program refer to them? Maybe what you need is some sort of collection.

  • Praoblems in creating a variable using JSP - el

    Posting this again :
    Please help
    How to create a variable using <c:set> whose value is
    specified within the tag body . I want to use this
    variable created as one of the parameters in a
    javascript method call . But my problem is when I run
    my application and do the view source , the HTML page
    shows me the variable as it is without substituting
    its value .
    can anyone help ??? its urgentThis is my code :
    <c:forEach var="photo" items="${photos}" varStatus="status" >
    <c:set var="photolink${status.index}" >
    Click to view full-size:<br><img style=margin-left:20px src='http://147.147.2.91:7001/pfk-deploy/thumbnail.do?photo="{photo.photoid}"' border=0 width=75 height=56><br><br>
    </c:set>
    doSearch( "<%=desc%>", '{c:out value="${photolink}"/}');
    </c:forEach>
    Iam using weblogic 8.1 and my web.xml says Web Application 2.3.
    Can this be a problem.

    Posting this again :
    Please helpWhy? How'll that help - you should have posted the extra info in your original post - http://forum.java.sun.com/thread.jspa?messageID=4327403. Double post.
    ram.

  • Error: object variable or with block variable not set when creating journal

    Hello
    When I try to create a new journal, I get an error "object variable or with block variable not set"
    This is happening with some computers but not all of them, the same user can create a journal in some computers.
    I tried uninstalling and reinstalling BPC office client but that did not work.
    Do you have any other ideas ?
    Thank you in advance.

    Hi,
       You have to check first  if you are able to access the reporting service frm that speific client machine typing:
    http://<reporting server name>/reports. If all is woking well , you have to check also the number of default sheets for an empty excel sheet (should be 3) - I ma not sure what version are you using.
        If still not work, please let me know when exactly the error appear, when you try to open the template (clicking on journal option) or after when you fill the report, save it, so on.
    Best regards,
    Mihaela

  • Creating variables in BO using BO SDK

    Hi,
    We can create variables which can be formulas applied on objects using infoview.
    Is there any way, these variables can be created using java BO SDK?
    Please paste some sample code for us.
    Cheers,
    Shruti

    Please find below a snippet code based on java managed RAS api that adds a formula onto the report. I hope this answer your question.
    <%@ include file="logon.jsp"%>
    <%
        ReportClientDocument oReportClientDocument;
        IReportAppFactory oReportAppFactory;
        IInfoObjects oInfoObjects=null;
         IInfoObject oInfoObject=null;
         String reportName = "SimpleRCAPIReport.rpt";
        // Retrieve report to be modified
        oInfoObjects = iStore.query("Select * from CI_INFOOBJECTS where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 0 and SI_NAME = '" + reportName + "'");
         oReportAppFactory = (IReportAppFactory)es.getService("", "RASReportService");
         oReportClientDocument = oReportAppFactory.openDocument((IInfoObject)oInfoObjects.get(0), 0, java.util.Locale.ENGLISH);
         // First create the formula field
         FormulaField newFormulaField = new FormulaField();
         //  Set the parameters (assume it's a string and Crystal Syntax)
        newFormulaField.setText("{Customer.Contact First Name} + ' ' + {Customer.Contact Last Name}");
        newFormulaField.setName("CustomerName");
        newFormulaField.setSyntax(FormulaSyntax.crystal);
        newFormulaField.setType(FieldValueType.stringField);
        // Now add it to the report
        oReportClientDocument.getDataDefController().getFormulaFieldController().add(newFormulaField);
         // Now that the formula has been created, add the newly created formula to the report
         // First determine which section to add the formula field to - in this case the details section
         ISection sectionToAddTo = oReportClientDocument.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0);
         // Get back all the formulafields in the report
         Fields formulaFields = oReportClientDocument.getDataDefController().getDataDefinition().getFormulaFields();
         int formulaFieldIndex = formulaFields.find("{@CustomerName}", FieldDisplayNameType.formulaName, java.util.Locale.ENGLISH);
         Field formulaField = (Field)formulaFields.getField(formulaFieldIndex);
         // Set the type of field this is
         formulaField.setType(FieldValueType.stringField);
         // Now create a new Field object which will be added to the report
         FieldObject oFieldObject = new FieldObject();
         // Set the datasource of this field object to the formula form of the above Database Field Object
         oFieldObject.setDataSourceName(formulaField.getFormulaForm());
         oFieldObject.setFieldValueType(formulaField.getType());
         // Now set the co-ordinates of where the field will go
         oFieldObject.setLeft(8000);
         oFieldObject.setTop(1);
         oFieldObject.setWidth(1911);
         oFieldObject.setHeight(226);
         // And finally Add it to the report
         oReportClientDocument.getReportDefController().getReportObjectController().add(oFieldObject, sectionToAddTo, -1);
         // Now display the report
       session.setAttribute("reportSource", oReportClientDocument.getReportSource());
       response.sendRedirect("CrystalReportViewer.jsp");
    %>
    Cheers
    Alphonse

  • How to use a variable value set from custom dll in dataset

    Hi,
    I've inherited a SSRS report that I need to add some functionality to.  I'm setting a variable, ADAuthorizations, from a custom dll 
    ADAuthorizations is a string of all AD groups a user is a member of and I need to use this as a filter in a dataset.  I've tried using this variable as shown in the query below but I'm getting an error "The expression used for the parameter 'Unit_Permissions"
    in the dataset "Unit_Permissions" includes a variable reference.  Variable values cannot be used in query parameter expressions."  Is there another way I should go about doing this?   
    = "SELECT UnitCode, UnitName " &
      "FROM dbo.VW_Unit_Permissions " &
      "WHERE UserId in (" & Variables!ADAuthorizations.Value & ")" &
      "ORDER BY UnitName "
    Thanks,
    Robert

    Please follow below steps,
    1. Create a custom code to get all the users in an array,
    Public Function getUserName() As String()
       dim Users(1) as string
       Users(0) = "user1"
       Users(1) = "user2"
    return Users
    End Function
    2. Create dataset using the below query,
    SELECT UnitCode, UnitName FROM dbo.VW_Unit_Permissions ORDER BY UnitName
    3. Add a parameter @User and set properties : (Datatype as text, Allow multiple values, Visible)
    Under "Available Values" select specify values and set the label and values as expression.
    =Code.getUserName()
    4. Similarly for "Default values" as
    =Code.getUserName()
    5. Go to tablix properties and select the filter tab and set the properties as below,
    - Select Expression "UserId" i.e =Fields!UserId.Value
    - Operator as "IN"
    - Value as =Parameters!User.Value
    6. Preview the report.
    Regards, RSingh

  • How to create dynamic connection string with variables using ssis.

    Hello,
    Can anyone let me know on how to create dynamic connection string with variables using ssis?
    Any help would be appreciated.

    Hi vinay9738,
    According to your description, you want to connect multiple database from multiple servers using dynamic connection.
    If in this case, we can create a Table in our local database (whatever DB we want) and load all the connection strings.  We can use Execute SQL Task to query all the connection strings and store the result-set in a variable of object type in SSIS package.
    Then use ForEach Loop container to shred the content of the object variable and iterate through each of the connection strings. And then Place an Execute SQL task inside ForEach Loop container with the SQL statements we have to run in all the DB instances. 
    For more details, please refer to the following blog:
    http://sql-developers.blogspot.kr/2010/07/dynamic-database-connection-using-ssis.html
    If there are any other questions, please feel free to let me know.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Setting persitent system environment variables using java program

    hai,
    Iam tryng to write installation for an application,which require to set some persistent system environment variables using java program. I have tried using set command Runtime.getRuntime().exec("cmd /c set blah blah "),but this applies only to that particular DOS promt only,i presume.And this is not perisistent.please do help.
    Biju

    The solution I proposed worked only on Windows XP/2003.
    The following solution will work on Windows NT/2000/XP/2003 with JDK 1.2+.
    1- Download the [url http://www.gjt.org/download/time/java/jnireg/registry-3.1.3.zip]JNIRegistry zipped archive.
    2- Open the registry-3.1.3.zip file and extract in the folder of your choice ( Eg. c:\setenv ) only the 2 first files (when sorted by path): ICE_JNIRegistry.dll and registry.jar.
    You don't need to keep the folder tree in the extraction.
    3- Create the following SetEnv.java file in the same folder ( Eg. c:\setenv ).
    import com.ice.jni.registry.Registry;
    import com.ice.jni.registry.RegistryKey;
    import com.ice.jni.registry.RegStringValue;
    import com.ice.jni.registry.RegistryValue;
    public class SetEnv
        static final String REG_HKLM_SUBKEY_NAME = "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
        public static void main(String[] args)
        throws Exception
            new SetEnv().exec(args);
        void exec(String[] args)
        throws Exception
            if (args.length != 2)
                throw new IllegalArgumentException("\n\nUsage: java SetEnv {varName} {varValue}\n\n");
            String varName = args[0];
            String varValue = args[1];
            RegistryKey key = null;
            RegStringValue value;
            try
                key = Registry.HKEY_LOCAL_MACHINE.openSubKey(REG_HKLM_SUBKEY_NAME, RegistryKey.ACCESS_ALL);
                value = new RegStringValue(key, varName, RegistryValue.REG_EXPAND_SZ);           
                value.setData(varValue);
                key.setValue(value);
                key.flushKey();
            finally
                try { key.closeKey(); }
                catch (Exception e) {}
    }4- Compile it.
    javac -classpath .;registry.jar SetEnv.java
    5- Run it. varName and varValue are strings of your choice.
    java -classpath .;registry.jar -Djava.library.path=. SetEnv varName varValue

  • How to create a Document Set in SharePoint 2013 using JavaScript Client Side Object Model (JSOM)?

    Hi,
    The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
    But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
    below my code. I am using Content editor web part and attached my JS file with that :-
    <div>
    <label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
    <input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
    </div>
    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
    <script type="text/javascript">
       SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
    // This function is called on click of the “Create Document Set” button. 
    var ctx;
    var parentFolder;
    var newDocSetName;
    var docsetContentType;
    function CreateDocumentSet() {
        alert("In ClientContext");
        var ctx = SP.ClientContext.get_current(); 
        newDocSetName = $('#txtGetDocumentSetName').val(); 
        var docSetContentTypeID = "0x0120D520";
        alert("docSetContentTypeID:=" + docSetContentTypeID);
        var web = ctx.get_web(); 
        var list = web.get_lists().getByTitle('Current Documents'); 
        ctx.load(list);
        alert("List Loaded !!");
        parentFolder = list.get_rootFolder(); 
        ctx.load(parentFolder);
        docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 
        ctx.load(docsetContentType);
        alert("docsetContentType Loaded !!");
        ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
    function onRequestSuccess() {       
        alert("In Success");
        SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
        alert('Document Set creation successful');
    // This function runs if the executeQueryAsync call fails.
    function onRequestFail(sender, args) {
        alert("Document Set creation failed" + + args.get_message());
    Please help !!
    Vipul Jain

    Hello,
    I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
    Value cannot be null.Parameter name: context"...
    Also, I tried removing SP.SOD.executeFunc
    from my code, but no success :(
    Kindly suggest !!!
    Vipul Jain

  • How to set a value to a Presentation Variable using GO URL?

    Hi All,
         I am working on a drill (GO URL) from Dashboard page1 to Dashboard page2.
         The problem I am facing is, I am not able to pass a value to the presentation variable through GO URL. (I have to pass "Customer Category" static
    value to The presentation variable present in Dashboard Page2 ).
         The Dashboard page2 is having a view select in which we are using presentation variable to select the report based on the value selected in
    View Select.
         For example: If the user selects "Customer Category" value in View select and clicks on GO button Customer Category report will show the out put.
         When i am drilling from Dashboard Page1 I have to pass a value to the presentation variable used in view select and also pass some filter condition in
         GO URL.
         Please let me know if it is feasible to pass a value to the presentation variable through GO URL in OBIEE 10.1.3.4.
         It will be greate if you can provide me with the syntax to set a value to the presentation variable of dashboard page2 through GO URL.
    Thanks and Regards,
    Sagar Vishwanathwar.

    1) You have to navigate to dashboard page, not to answer request = you have to use "Dashboard URL API" not GO URL API.
    2) On the target page, you have to place dashboard prompt, which sets required presentation variable.
    3) Refer to the target using Dashboard URL API and set filter on prompt column using URL parameters. Example: http://localhost:9704/analytics/saw.dll?Dashboard&PortalPath=%2Fusers%2Fadministrator%2F_portal&Page=page%201&Action=Navigate&P0=1&P1=eq&P2=D_TIME.YEAR_CODE&P3=%221996%22
    Do not forget to use Action=Navigate. The syntax for setting filters using url parameter is the same as for GO URL API described in Business Intelligence Presentation Services Administration Guide.
    This is the way, you can implement navigation to parametrized direct SQL reports including passing filter values...
    Regards K.

  • How to use the value of a variable to set another variable

    Hello Experts,
    Is it possible to access the value of variable set by the user and set the default value of another variable using the user entered value for the first variable? Example:
    Date variable
    Week variable
    Month variable
    User enters one of those and the other two are automatically prefilled with the correct values?
    Thanks
    Rado

    Hi Rado,
    Gothrough following code
    Which reads year from user input and converts it to factory calendar week , following which you should able to convert user inputs to required parameters.
    DATA:  v_year1 TYPE i,
            v_int   TYPE i,
            v_week1 TYPE kweek,
            v_qurt  TYPE i,
            v_perd  TYPE /bi0/oifiscper,
            v_iweek TYPE i,
            v_periv TYPE periv VALUE 'Z4'.
    DATA : v_vweeks  TYPE /bi0/oicalweek,
            v_vperd   TYPE /bi0/oifiscper,
            v_vperiv  TYPE /bi0/oifiscvarnt VALUE 'Z4'.
    DATA : vit_weeks LIKE /bi0/scalweek OCCURS 0 WITH HEADER LINE.
    DATA : v_perd1   TYPE umc_y_fiscper,
            v_weeks   TYPE umc_ys_dimvals,
            v_pweeks  TYPE i.
    CASE i_vnam.
       WHEN 'WPIYWEEK'.                "Variable name of char. in Bex
    *Check for Step 2 (After user gives inputs on selection screen)
         CHECK i_step = c_after.                                "Step:2
         CLEAR :  v_year1,
                  v_week1,
                  v_iweek.
    *Read the value of variable which used has entered on sel. screen
         READ TABLE i_t_var_range INTO wa_var_range
                                     WITH KEY vnam = 'WPIFYEAR'.
         v_year1 = wa_var_range-low.
         CALL FUNCTION 'TIME_GET_LAST_WEEK'
           EXPORTING
             if_year     = v_year1
           IMPORTING
             ef_week     = v_week1
           EXCEPTIONS
             fatal_error = 1
             OTHERS      = 2.
         IF sy-subrc <> 0.
    *           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    *Get the no. of week from YYYYWW format
         v_iweek = v_week1+4(2).
         l_s_range-low  = v_iweek.
         l_s_range-sign = c_include.
         l_s_range-opt  = c_equal.
         APPEND l_s_range TO e_t_range.  "This is the output structure in which u have to add the result
    Endcase.
    Hope that helps.
    Regards
    Mr Kapadia
    Assigning points is the way to say thanks in SDN.

  • Using URL variable to set initialy selected ds row

    Hello everyone,
    Could anybody suggest a solution or point me to a working
    demo of a script that processes a URL variable and set the current
    row accordingly. I am trying to pass a @id of a particlar row in a
    URL variable to identify a particluar row, I want to be selected
    initially.
    Thanks,
    Nick

    Hy guys,
    Just figured it out myself. Here is the script:
    <script type="text/javascript">
    // define your datasource. I have called it dsGallery. This
    name is used later in the script a few times
    var dsGallery = new Spry.Data.XMLDataSet("gallery.xml",
    "/gallery/photos/photo");
    dsGallery.addObserver({ onPostLoad: function(ds, type) {
    var strReturn = "";
    var strHref = window.location.href;
    if ( strHref.indexOf("?") > -1 ){
    var strQueryString =
    strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length;
    iParam++ ){
    if (
    aQueryString[iParam].indexOf('id' + "=") > -1 ){
    var aParam = aQueryString[iParam].split("=");
    strReturn = aParam[1];
    // look if a row with a matching @id is present in the
    datasource
    var row = dsGallery.findRowsWithColumnValues({"@id":
    strReturn}, true);
    // If we have a matching row, make it the current row for the
    data set.
    if (row) dsGallery.setCurrentRow(row.ds_RowID);
    break;
    </script>
    Thanks to the folks whose scrips were really helfull in
    building this one.
    Nick

  • Creating variables in a java swing program useing event

    This is my code:
    *Old School Calculator
    *@Collin Doering
    *Version 2.00
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class OSC {
         private static void createAndShowGUI() {
              int first = 0;
              int second = 0;
              int third = 0;
              int fourth = 0;
              int fifth = 0;
              int answer;
              System.out.println ("Calculations");
              System.out.println ("-------------");
              JFrame.setDefaultLookAndFeelDecorated(true);
              JFrame frame = new JFrame("OSC");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JButton button1 = new JButton("1");
    button1.setMnemonic(1);
    button1.addActionListener
         new ActionListener() {
              public void actionPerformed (ActionEvent e) {
    first = 1;
    //This is when the error says "Local variable first is accesed from
    with in inner class; needs to be declared final;
                   System.out.println ("first = ");
    JButton button2 = new JButton("2");
    button2.setMnemonic(2);
    button2.addActionListener
         new ActionListener() {
              public void actionPerformed (ActionEvent e) {
                   System.out.println ("Second = ");
    JButton buttonx = new JButton("x");
    buttonx.addActionListener
         new ActionListener() {
              public void actionPerformed (ActionEvent e) {
                   System.out.println ("answer: ");
    JPanel panel = new JPanel(new GridLayout(10,10));
    panel.add(button1);
              panel.add(button2);
              panel.add(buttonx);
              frame.getContentPane().add(panel);
    panel.setBorder(BorderFactory.createEmptyBorder(
    30, //top
    30, //left
    10, //bottom
    30) //right
    frame.pack();
    frame.setVisible(true);
         public static void main(String[] args) {
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    I am trying to create variables so i can make a calculator (right now i only have buttons 1, 1 and multiply). //This is when the error says "Local variable first is accesed from
    with in inner class; needs to be declared final; then when i declare it final it says <identifier expected>. Could some one please help me. thanx.

    Please post code within code tags (press the "code" button).
    Why are you using an inner class? Simplify:
    public class OSC implements ActionListener {
    button1.addActionListener( this );
    public void actionPerformed( ActionEvent e ) {
        if ( e.getSource() == button1 ) . . .

Maybe you are looking for

  • Basic Q, Routing all the audio tracks to a bus or aux channel strip ?

    I'm a little confused on this issue. I've been doing separate tracks for the sax solos and vocals using the best parts of several tracks with automation. I've been adding the same effect in each track separately and I know this is not good. I'd like

  • How combine book cds into one fi

    I use my zen primarily for audio books. When I rip them from cds, and upload them to my zen, it shows each cd as a separate album. Long books will show up as 5-20 separate albums. This is a pain when I have 0 books on my player -- I have to scroll th

  • JPA AND HIBERNATE (createquery PB)

    Hi, I have an issue in jpa-hibernate program : try{ List dmvs = em.createQuery("select c from Dmv as c order by c.num ASC").getResultList(); System.err.println("found finsh"); if (dmvs==null ||dmvs.size() == 0) {      return -1; for (Iterator iter =

  • Samsung Note 4 Camera Failed

    Just received my Note 4 and set it up. Camera does not work. It says Camera Failed. I turned device off and back on, forced stop on camera and cleared, no software updates are available. Really don't want to do factory reset with hours invested in se

  • Mass generation of profiles of customize role in sap

    Dear All, I am unable to generate mass profile for customize roles in SUPC.After pressing Generate button its showing "Choose at least One role".