Joining array variable to create a path

Hi,
I would like merging 3 variables and using it to copy a file. What am I missing?
set-variable -name ModuleVariables -visibility public -Scope Script -Value @("\Trousse\Modules","Variables.psm1")
set-variable -name $PCompletTrousse -visibility public -Scope Script -Value "C:\Temp\ShockwavePlayer10_Frv1"
set-variable -name ScriptDir -visibility public -Scope Script -Value "C:\Temp\Logiciels\Scripts Powershell\_!NTrousses1.0_Frv1"    
Copy-Item "$ScriptDir+$ModuleVariables[0]+$ModuleVariables[1]" -Destination $PCompletTrousse
Thanks,
François

Hi,
I just found this would work too:
Copy-Item (Join-Path -path (Join-Path $ScriptDir -ChildPath $ModuleVariables[0]) -childpath $ModuleVariables1])  -Destination $PCompletTrousse
Not sure to understand the difference between your solution and mine. Which one is better?
Thanks,
François
Both make calls out to another function or cmdlet.  The issue is that the '+' to combine strings must exist outside the strings to combine. For example:
$a = "adam"
$b = "bob"
$c = "$a+$b"
# $c now has a value of "adam+bob"
$d = $a + $b
# $d now had a value of "adambob"
Combining the strings outside of a function call or cmdlet would probably be a little faster, but negligible depending on the number of times you do it. 

Similar Messages

  • How to create an array variable

    Hi folks,
    I'm developing a flowN activity , for each branch created, I need to pass different values (values I get from DB).
    For this my plan would be,
    -create an array variable , load all the values(from DB) into the array
    -pass the array to each branch in flowN activity based on the index
    As I'm newbie to BPEL, I do not know how to create an array variable.
    Could you people guide me please.
    Regards
    Viki

    Hi,
    I created my string array like
    <element name="string_array">
    <complexType>
    <sequence>
    <element name="input" type="string" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    </element>
    <variable name="arr" element="client:string_array"/>
    I am able to add values to my array variable named as "arr"
    When I use the following code snippet, it gives my the value of the entire list.
    <%ora:getNodeValue(bpws:getVariableData('arr'))%>
    But when I try retireve values one by one like <%ora:getElement('arr','/client:string_array/client:input',[0])%>, its giving me error.
    Guide to get throu' this.
    Viki

  • Help creating a path using variables.

    HI
    I;m trying to create a path to a movievclip created with
    attachMovie. I need tio create the path using variable:
    _root.var1.var2.gotoAndPlay("something");
    How can I tell flash that var1, var2, etc are variables and
    not a relative path?
    Tks,

    Hello Tks,
    depending where the movieclip is that you are trying
    communicate with you need to use either other movieclips or you
    will need to use _parent.
    var gong:MovieClip;
    var bong:MovieClip;
    var song:MovieClip;
    this.attachMovie("gong".....
    gong.attachMovie("bong"....
    bong.attachMovie("song"...
    to access song from the timeline in which all these movie
    clips were attached
    this.gong.bong.song.variable
    from song to the timeline in which all movie clips were
    attached
    song._parent._parent._parent.variable
    Hope this helps..
    moozungu

  • How do I use an array variable in the assignment target?

    Hi,
    I am creating a BPEL process in which I have to use an array variable. The array variable needs to be initialized based on some condition.
    The issue is I cannot find a way to set the value of the array variable. There are ways to GET the value of an array variable indexing into it.
    But how do I set the value by using the Array variable in the <to> tag?
    Any help is appreciated. I am using BPEL 10.1.2.0.2.
    Thanks.

    You can declare a variable of type integer which will server as your index. Figure out based on some condition in your process which index of array to update. Assign to your integer variable you created.
    And have Assign copy operation like this -
    <copy>
    <from variable="Var_Output_FetchDueDate"
    part="OutputParameters"
    query="/ns18:OutputParameters/ns18:DUEDATE"/>
    <to variable="outputVariable" part="payload"
    query="/client:GetCustomerAccountInformationProcessResponse/client:customer/client:accounts/client:account[$Var_Counter]/client:dueDate"/>
    </copy>
    I have been using this in my processes.

  • How do I use a OS (Windows) Environment Variable in the source path of me ActionScript 3.0 settings

    I'm sure this can be done as I know we used something similiar at my old work place, below is an image showing what I am attempting to do.
    We used this to create more portable / shareable assets files which when symbols are linking to code, the code was very often in different directories on different machines.
    So we had set up environment variables in the OS to point to source directories and then used these variables in the source paths.
    As long as everyone had these variables set up then it would all work.
    Anyone know the correct way to do this in Flash CC
    Thanks in advance!
    Best Wishes
    Rhys Thomas

    sinious the problem with doing that is that the changed path gets into the code repository as well, so you wind up with everyone going back and forth changing it to their own value, which is a hassle. If you use relative paths and a standard project setup, then it all "just works" without a problem.
    For example, this is the setup I use:
    .dev
         .thisProject
              .Flash1
                   Flash1.as
                   .Flash1
                        Flash1.xfl
                   .view
                        .audioAssets
                        .customViews
              .SoundLib
                   SoundLib.xfl
              SoundLib.swc
         .bin <swfs are output here
              .xml
         .core
              .control
              .model
              .service
              .view
    We have a "base project" that you check out to start a new project (we do heaps of similar work), and the paths are already set up to be relative. Having each project point to its own copy of the core code allows for fine-grained control of which revision you're using--we've even pointed deliberately to old versions or branches on rare occasions.
    The bin folder is actually shared with the website repository, which is in a different directory from the Flash source code (in the website, it has a different name). This allows the generated swfs to be easily updated and ensures that the latest XML is being used both for development and on the site.
    The "thisProject" folder actually includes a Flash Builder workspace with all the standard shortcuts, etc., already set up. This is primarily because of how the "default path" works when you create a new Flash Pro project in FB. Because we output a level up from the workspace, we hack the .metadata folder every time, but that's a small change.

  • How to use array variable in Oracle

    Hi,
    I want to use a array variable to store many string values i.e. values like ( "my name is hhhyy and i have a tack", "My data is valid" , "hhggg gaya hujjjs")
    currently all these values are in seperate variables , I want to consolidate them in one array and use it in further , after replacing some values from them.
    I want to take data too. I am thinking of using "Varchar array" with values are in one cursor i want to take them in single array.
    varchar array is throwing some exception once it has taken all the value. I had extended it upto 100 values.
    What could be the possible solution.
    create or replace function testet
    ( value varchar2) return varchar2
    as
    x_value Varchar2(2000);
    x_value2 varchar2_array := varchar2_array();
    x_value3 number;
    cursor c1 is
    SELECT val
    FROM table A
    WHERE A.coulmn= 'val';
    begin
    x_value2.EXTEND(100);
    x_value3 := 1;
    for indx IN c1
    loop
    x_value2(x_value3):= indx.val;
    dbms_output.put_line(x_value2(x_value3));
    x_value3 := x_value3 + 1;
    end loop ;
    end;

    user12403816 wrote:
    actual error :
    ORA-06533: Subscript beyound count
    ORA - 06512 " at Function name , line 23
    ora - 06512: at line 3
    06533, 00000, "Subscript beyond count"
    // *Cause:  An in-limit subscript was greater than the count of a varray
    //          or too large for a nested table.
    // *Action: Check the program logic and explicitly extend if necessary.code contains bug.
    after code is fixed, then no error gets thrown

  • Working with array variables defined in the BPM process

    Hello,
    I have created an array variable in my process. This array was created based on a custom type that contains 2 strings variables.
    How can I set/get and add new items to this array variable using java code?
    The only thing I know is that, if this was a simple variable I would do something like this:
    DCBindingContainer bc = (DCBindingContainer)FacesContext.getCurrentInstance().getApplication().evaluateExpressionGet(FacesContext.getCurrentInstance(), "#{bindings}", BindingContainer.class);
    JUCtrlAttrsBinding dc = (JUCtrlAttrsBinding) bc.findNamedObject("myVar");
    dc.setInputValue("theValue".toString());
    thank you
    fwu

    Hi
    I've been working on TZ's recently... see this post:
    https://supportforums.cisco.com/discussion/12474756/how-check-daylight-saving-within-uccx-script
    My approach in the scripts was that basically I allow the department to set their opening hours in the timezone of their choice.
    They have a management web page served from CCX that accepts start/end times each day, and a timezone. That all gets stored in XML.
    In the script, based on that information I get the current time in whatever timezone is set, and compare that to the XML open/close times.
    Similarly for holidays, I get the current date/time in the holiday TZ and compare the holidays to that.
    Aaron

  • Use of variables in "FOR XML PATH"

    Other than using dynamic sql (which we don't want to use) is there a way to use a variable in For XML Path, e.g.
    select
    FOR XML PATH (@BookName), ROOT('Book'), TYPE
    TIA,
    edm2

    In terms of general XML design this is poor.  An element is normally a 'thing', and the attributes are normally the properties of that thing.  Therefore in your case you would have a Book property with a 'name' attribute.  It would be impossible
    to create an XSD for your xml, and makes it awkward for readers of your xml - how do they know the book name beforehand?  Creating this xml in the normal fashion would also make it easy to create without any messing around ( string manipulation,
    other hacks ), eg
    DECLARE @BookName NVARCHAR(20) = 'SomeBook'
    SELECT
    @BookName "@name"
    -- Other book attributes
    FOR XML PATH ('Book'), ROOT('Books'), TYPE
    So now you have a Book item(s) within a Books collection.  Easy!  : )

  • Steps to create Replacement path

    Hi Gurus,
    Kindly provide me the steps to create Replacement path in Query Designer.
    My requirement:
    Have to replace the Charac.var  ZVAR2 by Charac.var ZVAR2.
    Thanks.

    Hi,
    you use replacement path variable method for it ..
    for the detail, you check this link.
    In over-there is also explained how-to make it & overview.
    <link farm removed by moderator>
    Hopefully it can helps you a lot,
    Regards,
    Ravindra.
    Edited by: Siegfried Szameitat on Jan 22, 2009 3:25 PM

  • How to feed a query using a variable defined as Replacement Path-Query

    Scenario description : BI NetW 2004S - InfoCube with the following characteristics Customer, OrderDate, OrderYear and the following KeyFigure Number of Pieces.
    Objective: I need a query "QB" that shows how many pieces a set of customers has ordered in the year 2008. The set of customers is defined as all customers that in the previous years (the user can select one or more years) have ordered more than 500 pieces within the same year.
    Implementation: In general terms the idea is to build a query "QB" with the characteristic "Customer"  that is restricted (filtered) using a variable that is fed by another query "QA" (Replacement Path-Query).
    In order to have the selection of customers that for each of previous years (2007, 2006, 2005,...) have ordered more than 500 pieces, in the query "QA":
    - I put OrderYear as filter and defined a variable in order to ask the user which year/s he wants to analyse to define the selection
    - I put Customer and OrderYear in row
    - I put the KeyFigure Number of Pieces in column
    - I've defined the following condition: Number of Pieces > 500 with the option Caracteristic Assignment = All Characteristics in the Drilldown Indipendently
    Now if I run the query "QA" it works correctly showing me all customers that in the selected years have ordered more than 500 pieces within of the same year.
    If I run the query "QB" it shows a correct result only if I enter only one year (for example 2006) in the OrderYear field (coming from the query "QA"); if I enter more than one year (for example 2006 and 2007) the selection of customers showed is not the same defined by the first query "QB": I was expecting to see all customers defined from the first query less all customers that have no ordered any piece in 2008.
    Questions
    1) Why is query "QA" working on a different selection of customers when the user selects more than one year?
    2) Cosidering the scenario and the objective described above do you have any other idea?
    Thanks
    Ciao
    Roberto

    Hi Christophe,
         it's ok for me if I consider the customer only once in the final selection of customers that feeds the final query, this is my objective.
    However as test I've created 2 "input" queries, one related to 2006 and one related to 2007, and then in my destination query I've tried to restrict the customer using 2 variables of type replacement path-query (one attached to the 2006 query and one attached to the 2007 query). Unfortunately when I try to check and save the destination query, Query Designer tells me it is not possible to restrict the characteristic in this way.
    Could you please describe me steps you run in to order to restrict a characteristic using more than one variable of type replacement path-query?
    Thank you in advance for your answer.
    Ciao,
    Roberto

  • Formula variable of type replacement path not working

    Hi Folks,
    I have created formula variable of type replacement path and replaces with characteristic key.I wanted to use charecteristic infoobjects in coluns so that i have created formula variable for that.But when excecuting the query in web it is not displaying values for that formula.
    Can anyone plz solve this,if u come accross this situation before.
    Thanks and Regards,
    Ravikiran
    Edited by: MRK@SAPBI on Jun 11, 2011 1:13 PM

    Thanks vineet, for your quick reply.
    yes,i have used the characteristic in a row and it is a number.
    Still it is not displyaing values.But i need to calculate the couter for the same formula created on that charateristic and need to put condition in the query.
    thanks,
    Ravikiran

  • A formula with a formula variable with a replacement path delivers X

    A formula with a formula variable with a replacement path delivers X as a result if the characteristic of the replacement is not in the drilldown
    I have Created on ( date ) on which I have a Formula variable . I have used that Formula Variable in my calculated Key figure .
    Now the Problem is If I use Created on in ROW , The calculated key figure works . But if I don't use in Row , The calculated Key figure shows X . Situation is Users don't want to see Created on in ROW .
    If I use in row and hide also , then number of Records  will be same .
    Pls guide me what shoud I do .
    Is this problem related to support pack .

    hi
    i would like to know how to create the replacement path and authorisation variables.
    what are the steps we need to follow in rsa1.
    Edited by: vasu reddy on Apr 9, 2008 11:28 AM

  • Newbie needs help with passing variables or creating flash object based on parameters

    Hello Community,
    I'm an amateur developer of Ms Access databases. In one of my applications I want to visualize the options available when reaching a certain score.
    What I'd like to get from this trial period, is a flash animation of a dartboard. Depending on an array of variables that provides the fill color (or reference thereof) the layers of the flash object will be dynamicly created, altered, or switched. The dartboard itself remains "static". I'm hoping to use 9 colors.
    I can manipulate the array any way needed. I can provide XML coding to pass the array variables. I'm just too new and untrained to incorporate this in a Edge animation or Dreamweaver.
    There is no need for interaction, once the object is created (ie no user feedback).
    Can someone point me in the right direction?
    thanks in advance,
    Jay from Stockholm

    Hi,
    I see you're using System.Data.OracleClient (which has been deprecated by MS) rather than Oracle.DataAccess.Client, but this works for me with Oracle's ODP, maybe it will help.
    Cheers,
    Greg
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    public class dataadapterfill
        public static void Main()
            using(OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl"))
                con.Open();
                using(OracleCommand cmd = new OracleCommand("select ename from emp where ename = :1", con))
                    cmd.Parameters.Add(new OracleParameter("myename", OracleDbType.Varchar2, 50)).Value = "KING";
                    OracleDataAdapter da = new OracleDataAdapter(cmd);
                    DataSet ds = new DataSet();
                    da.Fill(ds);
                    foreach (DataRow row in ds.Tables[0].Rows)
                        Console.WriteLine("ename: {0}", row["ename"]);
    }

  • How do I load values from a database column to an array variable in TS?

    I'm trying to get the values from the column in a database into an array variable in TS using the property loader.
    The Open Database, Open SQL Statement, and Property loader steps all complete and say "done".  But my array is empty when it's all over.
    Using TestStand 2010
    Microsoft SQL Management Express 2008
    Database configured by my company, I can not change it only read from it.
    Thank you,
    Newb-D

    The database has to be in a form that will work with the PropertyLoader and it sounds like it isn't.
    Try using the Import/Export Properties tool found in the Tool menu, to export some data to a database and then you can see if your database is compatible.
    My guess is you will have to write your own loader.
    Regards
    Ray Farmer

  • I have an iMac with 2 internal drives and set-up with multiple user accounts.  How do I create a path to store data files on my second drive within an application?

    I have an iMac with 2 internal drives and a multiple user account set-up.  Hw do I create a path to store data files on the second drive within an application?

    This is the Mac mini forum not the iMac forum however...
    Applications written for average users like Photoshop, Word, i.e. GUI based applications provide a 'Save' dialog box which while allow selecting second drives or any drive. The dialob box initially shown might be in the simple mode but you just need to click on the triangle to show the full set of options. You should then see the different drive names amongst other options.
    If your referring to an application your writing yourself then you need to build a pathname. This can be in one of two styles depending on the programming system your using. This could be a POSIX style path or a Mac style path.
    POSIX = /Volumes/volname/foldername
    Mac style = Volname:foldername:

Maybe you are looking for

  • Safari crashes when I open it on OSX 10.8.5

    Hi-- Safari crashes immediately when I open it. Below is the error I'm getting. I tried a couple methods I saw in other threads, including going to ~/LIbrary/Caches/com.apple.Safari and deleting the caches there. Thanks for your response! Aaron Proce

  • Extra line space appearing - Help!

    Hiya, Can anyone help.  When in Contribute, I have edited and have deleted a line space using 'shift+enter', it shows as having no line space in Contribute, but when it publishes - lo and behold - a line space appears. Can anyone help me resolve this

  • Inbound function module idoc_input_mbgmcr

    Is there an inbound function module idoc_input_mbgmcr in existence somewhere that i can use?

  • Please only post SAP Business Objects products related questions here

    Hi Thanks for reading. Unfortunately many people get confused with the term BI which was used for SAP BW at one time. With the acquisition of Business Objects some product names have changed. SAP BW is still SAP BW, please post in the respective foru

  • Installing/Uninstalling Itunes

    Am having an issue installing the latest version of itunes.... I get the following error in the installation process.... Error writing to file C:\Program Files\itunes\itunes.resources\pl.lproj\Aboutbox.rtf Verify you have access to that directory I h