Dynamic variable as a path problem.

Hi,
I’ve established that I needed a path
/flashcontent/screens.swf to use with loadmovie like so,
loadMovie(“/flashcontent/screens.swf”,_root.Empty_MC);
and this works. What I wanted to do was use a variable in my path
like this…
varpath = “/flashcontent/”;
loadMovie(varpath+”screens.swf”,_root.Empty_MC);
…this works fine!
What doesn’t work is if I use _root._url and make it
more dynamic. I split the path down to just the
“/flashcontent/” and made varpath equal that.
varpath = thesplitDownpath;
loadMovie(varpath+”screens.swf”,_root.Empty_MC);
I have traced to see what the differences are but the
variables are the same i.e. both strings, char length the same and
also made two different variables and compared the paths to see if
they equalled each other and that was true.
I must be missing something here!
Thanks in advance for any help on this matter.
Cheers Simon.

Sorry Kglad I'm being a bit of a numpty here and I don't know
what you mean?
Are you asking if it's a string literal or a String object I
working with? If thats the case then I think at a guess it's a
string literal!!!

Similar Messages

  • Problem in variable with replacement  path

    Hi ,
    I created one characteristic variable which is for manual input for date
    now i have to use this variable as replace ment path but wen i create the variable with replaceent path it is not visible in the dropdow list .
    Cud u tell me y its happng so.
    Thnx
    Points will be assigned

    Hi,
    There are two palces we can use replacement path as processing. One is for formula varible , which will be avialable in forumulas only. Other one is normal variable where you need to specify another query as the source while we are creating it. This second type will be avialable in the Left hand side of the screen of Query designer under your characterstic.
    So I hope you created a formula varible.
    With rgds,
    Anil Kumar Sharma .P

  • BW 3.5 - Issue with formula variable with replacement path

    Dear experts,
    I'm facing an issue with formula variable with replacement path.
    Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
    I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
    To do so I've setup a calculated key figure as follow:
    VAR1 * ("PO value" < 100 ) * "PO value"
    VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
    (The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
    The report as characteristic "plant" in rows and my CKF in columns.
    Now let's take an example. I have 3 POs in Plant 1:
    PO1 -> 150€
    PO2 -> 90€
    PO3 -> 80€
    Because of the variable with replacement path, the result in my query should be:
    plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
    But the result coming is 320, which is wrong.
    I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
    They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
    Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
    Any though is welcome!
    thanks

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

  • Variable with Replacement Path

    Hi, I have two queries. The results of the first one should be the input for the second one. E.g. the first query shows a list of personnel numbers and additional information. These personnel numbers shall be overtaken by the second query. The personnel numbers belong to "Dimensions" in the Query Designer. I alread tried to create a variable with replacement path to the dimension personnel number. I implementet this variable in both the first and the second query (under: "rows"). It`s no "Formular variable" and no "Calculated Key Figure" but a "Characteristic Value Variable" of a Dimension. The problem is now that I cannot execute any of the two queries. The error "Abort the query cannot be released for OLE DB for OLAP. System error in programm CL_RSR_REQUEST and form PREPARE_VQUERIES:INVALID_
    What is my mistake? Thank you in advance! Eve

    Hi Eve,
    It is possible to connect the 2 queries using a Replacement Path characteristic variable. You would need to create the variable on the char whose values you want to pass from Q1 to Q2. The variable will be of type replacement path and you will need to enter the name of Q1 from which it will get the values. Make sure that you include this char in the query definition of Q1 and Q2. In Q2 you will restrict the characteristic using this variable. DO not use this variable (replacement path) in Q1.
    In your query properties check if you have turned on the checkmark for Release for OLE DB for OLAP (3rd tab). If the check mark is there, then remove it.
    We are using the scenario in a couple of places, and it works very well.
    Hope this helps...

  • Formula variable with replacement path to another input variable

    Hi @ all,
    i have a question regarding "Formula variable with replacement path to another input variable".
    My Problem is that in selection screen and for info-fields the input variable is shown with its key and not with its description.
    Scenario:
    A formula variable (X) is used to get an input value of a characteristic variable (Y) for 0Fiscper3 to realize a IF-Then scenario.
    The formula variable (X) uses replacement path by variable (Y) replace by "key".
    In selection screen of the query variable (Y) is named with its key "ZAB_BUPE01" and not with its description " fiscal period". Same as for info-fields where the description is "ZAB_BUPE01" and not " fiscal period".
    Does anybody have a solution to display the selection variable correctly?
    Regards
    Tobias

    Issue Solved!
    The input varaible (y) for 0Fiscper3 was saved globally on the InfoProvider. This results in that the formula variable with replacement path only shows its technical name. I put the input variable in the query itself and it soved the problem. The variable is displayed with its description in selection screen.
    Regards

  • BEX 7.0: Formula variable with replacement path not working after BW Upg

    Hi all,
    We have a formula variable using replacement path for 0MATERIAL characteristic that is used in a calculated key figure, in order to perform conversion factor to change measure units (0MATERIAL attribute).
    This was working pretty well until an upgrade from 3.5 to 7.0 EHP 1. The list that is displayed contains all key figures empty instead of the desired values.
    Can anyone suggest what could be the possible reason for this?
    Thanks in advance.
    CCS

    Hi all,
    Problem solved!
    The solution was based on the u201Chow to...Report Data in alternate units of measureu201D document (for 3x version) . http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b7b2aa90-0201-0010-a480-a755eeb82b6f?quicklink=index&overridelayout=true
    Basically, the upgrade has override the previous changes made in the program LRRSVF20, like the "How to" document refers. Namely, the reference to YBW_AUNIT_ENHANCEMENT program.
    We have carried out the changes and, apparently, the query is now working fine.
    Thanks.
    Best Regards,
    Cátia Coelho Silva

  • Used of Sap text variable with replacement path in Bo designer

    Dear experts,
    I created a univers based on a SAp BW query. In this query I used a text variable in order to get dynamic header columns.
    The text variable is done by using "replacement path" that is the text is derived automatically from the user input triggered by a sap bw variable.
    example :
    the query contains a restricted key figure which shows net values for a selected year based on variable PYEAR.
    The name of this restricted keyfigure is &ZYEAR& where ZYEAR is the text variable with replacement path from the variable PYEAR.
    When generated the univers based on this query I get component &YEAR&.
    When I use this unvers in WebI my result containts header with &YEAR& althougth I selected for example the year 2006.
    According to several how to and white papers on SDN , it seems that text variables with replacement path are supported. So I am disapointed by this result.
    Can you give me advise to get a rigth result ?
    thanks a lot
    Olivier Doubroff

    Hi Rishit,
    I am trying to achieve the same as you, but it seems like text variables in restricted key figures do not work. I am using BO XI3.1 SP3 and SAP BW 7.01 SP6.
    A work-around for me has been to use the "user response" function in webi to create a webi variable that holds the dynamic text title. If the user inputs Jan 2010, I change the input to a date using the "user response" and "ToDate" functions in the webi variable editor. After changing the input to a date I use the RelativeDate to extract 1 month (e.g. 25 days) from the user input. Then I have both Jan 2010 and Dec 2010 as webi variables to use as headers for my restricted key figures.
    The formulas can easily become a little long, but by tweaking the user response string, you should be able to get dynamic headings by using webi functionality. But be aware that you need one webi variable for each dynamic heading if you use this method.
    Let me know if it works or if I can help more:-)
    Best regards,
    Morten

  • Time Format using text variable with replacement path

    Hi Friends,
                                 I've used "Text variable with replacement path" to make the column heading dynamic by replacing the values referring from "0calday"...
    everything is working fine, but here it is displaying the time format like
    YYYYMMDD (20030101), i want it to be displayed DDMMYYYY (01012003) in the column heading... how to make it possible?
    pls waiting for ur inputs, it's an urgent...
    Regards,
    Pattnaik

    Hi Satyakam,
    In the text variable properties make sure that in the replacment path you have chosen "Text" to appear date as per user setting . Other wise as in your case it must be set to "Key" which always shows in the format YYYYMMDD.
    Hope that helps.
    Regards
    Mr Kapadia

  • Text Variable With Replacement Path : supported in Webi 4.0 or Not.??

    Hello to All WebI Gurus,
    We are on BO 4.0
    We are building WebI report on top of Bex query using the BICS connection from IDT.
    Our BW query is having some Text Variable with processing type "Replacement Path".
    Also its having fiscal year period in filter with user input variable.
    the text variables references Fiscal year period and are used in Key figure description,
    hence whatever value the input variable will capture the description of Key figure changes accordingly/dynamically.
    But when I try to use it in BO it throws me an error msg saying :
    Unknown error occured in SL Services
    I am Aware that text variable in this fashion were not supported in BO XI3.1
    Used of Sap text variable with replacement path in Bo designer
    So are Text variable Supported in BO 4.0 in this fashion.
    Any response will be highly appreciable.
    Thanks & Regards
    Neeraj

    Hi,
    Here's a great SDN article, which includes several slides covering u201CWhich BEx features are supported using BICS connectivityu201D : http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d056e1bc-2794-2e10-959e-8779c5623cc5
    Pages 8 -> 12 cover these topics.
    If your design choices are compliant (supported) then i'd avise opening a support case if this issue persist after checking again on Patch2.11 (release recently)
    Regards,
    H

  • Path problem in windows os

    Dear friends,
    some time I meet a strange class path problem under windows enviroment. that is, the class path uses "/" to splite directory while not "\". so java will report error message like "NoClassFoundError: com/boland/...". I think there should be a way to adjust this environment problem. but I don't know how to set this. I will greatly appreciate if you happen to know this and let me know.
    Best wishes,
    Sam

    You reported an error in a package statement or reference. This is nothing to do with the OS folder structure per se, altho that is how it is implemented on a given platform like windows. Classpath statements are NOT platform independent, due to path separator issues. You should not use a system-wide classpath variable anyway, as this is really quite bad practice. Instead, create a run script for you program, and put the -cp switch in there. In any case, you should be referencing packages (separated by dots) in there anyway, not actual paths.

  • Dynamic variable Time for Select

    Hi,
    I try to develop some scripts but always I have the same problem , when I try to put in a Select instruction the variable Time, it doesn´t work correctly (for example):
    *SELECT(%example%,"ID","TIME","[ID]='%TIME_SET%' ")
    It doesn´t read correctly the variable Time_Set.
    Have you got any idea to try to do selects using dynamic variable?
    Thanks for all.

    Hi,
    Dynamic variables like %TIME_SET% do not interact very well with the compiled default logic (LGX files) when it is run after a data send. If you look at the Default.LGX file, you will notice that your *SELECT statement does not appear there because that *SELECT statement has already been compiled. That is why the logic works when it is run via the debugger (because the LGF file is getting executed at run time) and it does not work when it is run via a data send (because the LGX is being executed).
    What you will need to do is:
    1. Create a another logic file (for example: Calculation1.LGF) and copy the text from the Default.LGF to this new logic file.
    2.  Place the following text in the Default.LGF file:
    *RUNLOGIC
    *LOGIC=Calculation1.LGF
    *ENDRUNLOGIC
    3. Validate and save the Default.LGF file
    Now try running the logic after a data send and see if that works.
    Good luck,
    John

  • Order by dynamic variable

    Hello,
    I am trying to sort my query based on a dynamic variable p_sorton in the cursor as follows:
    function getMarketView2(
    p_event_id in ex_event.event_id%type,
    p_fromrow in integer,
    p_torow in integer,
    p_appTZ in char,
    p_calcTZ in char,
    p_sorton in varchar2) return varchar2 as
    type t_ticket_trade is ref cursor return ex_ticket_trade%rowtype;
    v_return varchar2(32767);
    v_return_integer integer;
    v_String varchar2(32767);
    v_ex_ticket_trade_obj ex_ticket_trade_obj;
    v_rowcount integer:=0;
    v_rowtotal integer:=0;
    v_done boolean:=false;
    v_sysdate date:=NEW_TIME(SYSDATE,trim(p_appTZ),trim(p_calcTZ));
    cursor cur_ticket_trade_event_open (p_event_id in ex_event.event_id%type, v_sysdate in date) is
    select "TICKET_TRADE_ID","SELLER_ACCESS_ID","CREATE_DATETIME","MODIFY_DATETIME","LASTMODIFY_BY",
    "BUYER_ACCESS_ID","OPEN_TRADE_DATE","CLOSE_TRADE_DATE","TICKET_SUITE_CODE","TICKET_DATETIME",
    "TICKET_TIMEZONE","TICKET_EVENT_ID","TICKET_TYPE","TICKET_SEAT_TYPE","TICKET_OPPONENT",
    "TICKET_TOTAL_SEAT","TICKET_PRICE","TICKET_PRICE_EXT","START_BID_DATE","OPEN_BID_PRICE",
    "CURRENT_BID_COUNT","CURRENT_HIGH_BID","CURRENT_LAST_BID_DATETIME","CURRENT_BID_INCREMENT_BY","TICKET_TRANSACTION_DATE",
    "TICKET_TRADE_STATUS" from ex_ticket_trade
    where ex_ticket_trade.TICKET_EVENT_ID = p_event_id
    and (ex_ticket_trade.ticket_datetime > v_sysdate)
    and (ex_ticket_trade.ticket_trade_status in ('F','A','AB'))
    and (ex_ticket_trade.ticket_suite_code='N' OR ex_ticket_trade.ticket_suite_code='Y')
    order by p_sorton desc;
    --ex_ticket_trade.ticket_datetime desc;
    ........then comes the rest of the code........
    This code compiles fine but does not use the value passed in the param p_sorton in the order by clause.
    the same code works fine when hardcoded to "ex_ticket_trade.ticket_datetime"
    No idea where I may be going wrong?
    Also can I do anything like ORDER BY v1 v2
    where v1 specifies columns to sort on and v2 asc/desc, coz that's what I really need to do?
    Pls help ...
    Thanks,
    Karuna

    Hi,
    Thanks for the reply ... I tried the same but due to my basic knowledge of pl-sql, I'm running into some other problem.
    ================================================
    CREATE OR REPLACE FUNCTION testMarketView(p_event_id in ex_event.event_id%type,
    p_fromrow in integer,p_torow in integer,
    p_appTZ in char, p_calcTZ in char, p_sorton in varchar2
                   ) return varchar2 as
    type t_ticket_trade is ref cursor return ex_ticket_trade%rowtype;
         v_return varchar2(32767);
         v_return_integer integer;
         v_String varchar2(32767);
         v_ex_ticket_trade_obj ex_ticket_trade_obj;
         v_rowcount integer:=0;
         v_rowtotal integer:=0;
         v_done boolean:=false;
         v_sysdate date:=NEW_TIME(SYSDATE,trim(p_appTZ),trim(p_calcTZ));
         TYPE t_ticket_trade_event IS REF CURSOR;
         cur_ticket_trade_event t_ticket_trade_event;
         v_dynQuery VARCHAR2(1000);
         cursor cur_event_seat_section_row (p_ticket_trade in ex_event_seat_inv.ticket_trade_id%type) is
         select distinct event_seat_section, event_seat_row
         from ex_event_seat_inv
         where ticket_trade_id = p_ticket_trade;
         type t_event_seat_section_row is ref cursor return cur_event_seat_section_row%rowtype;
    /*v_section varchar2(32767);
         v_section_row varchar2(32767);
         the 26 variables that belong to table ex_ticket_trade-----------
         v_ticket_transaction_date date;
         v_ticket_trade_status varchar2(10);*/
    begin
    v_dynQuery := 'select
    "TICKET_TRADE_ID","SELLER_ACCESS_ID","CREATE_DATETIME","MODIFY_DATETIME","LASTMODIFY_BY",
    "BUYER_ACCESS_ID","OPEN_TRADE_DATE","CLOSE_TRADE_DATE","TICKET_SUITE_CODE","TICKET_DATETIME",
    "TICKET_TIMEZONE","TICKET_EVENT_ID","TICKET_TYPE","TICKET_SEAT_TYPE","TICKET_OPPONENT",
    "TICKET_TOTAL_SEAT","TICKET_PRICE","TICKET_PRICE_EXT","START_BID_DATE",
    "OPEN_BID_PRICE","CURRENT_BID_COUNT","CURRENT_HIGH_BID",
    "CURRENT_LAST_BID_DATETIME","CURRENT_BID_INCREMENT_BY",
    "TICKET_TRANSACTION_DATE","TICKET_TRADE_STATUS"
    from ex_ticket_trade where
    ex_ticket_trade.TICKET_EVENT_ID = ' || p_event_id || ' and (ex_ticket_trade.ticket_datetime > '|| v_sysdate||')
    and (ex_ticket_trade.ticket_trade_status in ('||'''F'''||','||'''A'''||','||'''AB'''||'))
    and (ex_ticket_trade.ticket_suite_code='||'''N'''||' OR ex_ticket_trade.ticket_suite_code='||'''Y'''||')
    order by '|| p_sorton ||'desc ' ;
    select count(*) into v_rowtotal
    from ex_ticket_trade
    where
    ex_ticket_trade.TICKET_EVENT_ID = p_event_id
    and (ex_ticket_trade.ticket_datetime > v_sysdate)
    and (ex_ticket_trade.ticket_trade_status in ('F','A','AB'))
    and (ex_ticket_trade.ticket_suite_code='N' OR ex_ticket_trade.ticket_suite_code='Y')
    order by ex_ticket_trade.ticket_datetime asc;
    v_ex_ticket_trade_obj:=ex_ticket_trade_tabobj.initialize;
    v_rowcount:=1;
    OPEN cur_ticket_trade_event FOR v_dynQuery;
         LOOP
         FETCH cur_ticket_trade_event INTO t_ticket_trade;
    /*     -- THIS IS WHAT I HAVE TO DEAL WITH IF I CAN"T
         --PUT THE RESULTS OF THE CURSOR in t_ticket_trade
         v_ticket_trade_id , v_seller_access_id , v_create_datetime, v_modify_datetime , v_lastmodify_by ,
         v_buyer_access_id, v_open_trade_date, v_close_trade_date, v_ticket_suite_code, v_ticket_datetime,
         v_ticket_timezone, v_ticket_event_id , v_ticket_type, v_ticket_seat_type,     v_ticket_opponent,
         v_ticket_total_seat, v_ticket_price ,     v_ticket_price_ext , v_start_bid_date, v_open_bid_price ,
         v_current_bid_count , v_current_high_bid , v_current_last_bid_datetime , v_current_bid_increment_by ,
         v_ticket_transaction_date , v_ticket_trade_status ;
    if (t_ticket_trade.TICKET_SEAT_TYPE is null) then
    for t_event_seat_section_row in cur_event_seat_section_row(t_ticket_trade.ticket_trade_id) loop
    if (t_event_seat_section_row.event_seat_section is not null) then
    v_section := t_event_seat_section_row.event_seat_section;
    BEGIN
    select alt_txt into v_parking_desc from ex_alt_txt
    where event_id = p_event_id
    and alt_txt_type = 'PARKING_DESC'
    and original_txt = v_section;
    t_ticket_trade.TICKET_SEAT_TYPE := v_parking_desc;
    EXCEPTION
    WHEN no_data_found THEN
    v_section_row := 'Sec. ' || v_section;
    if (t_event_seat_section_row.event_seat_row is not null) then
    v_section_row := v_section_row || ', Row ' || t_event_seat_section_row.event_seat_row;
    end if;
    v_section_row := substr(v_section_row, 1, 30);
    t_ticket_trade.TICKET_SEAT_TYPE := v_section_row;
    END;
    exit;
    end if;
    end loop;
    end if;
    if ((v_rowcount >= p_fromrow) and (v_rowcount <= p_torow)) then
    -- p_ex_ticket_trade => t_ticket_trade
         -- THIS IS WHAT I CAN'T DO in the next line IF I get the results of the cursor in seperate variables
         v_ex_ticket_trade_obj:=ex_ticket_trade_tabobj.maprowtoobj(p_ex_ticket_trade => t_ticket_trade);
    v_string:=v_string||v_ex_ticket_trade_obj.todatastring;
    end if;
    if (v_rowcount>=p_torow) then
    exit;
    end if;
    v_section := null;
    v_section_row := null;
    v_parking_desc := null;
    v_rowcount:=v_rowcount+1;
    end loop;
    v_prefix:='1' || v_delimiter || v_rowtotal || v_terminator;
    v_return:= v_prefix || v_ex_ticket_trade_obj.tometadata||v_string;
    return v_return;
    end;
    ===========================================
    I keep running into one error:
    PLS-00403: expression 'T_TICKET_TRADE' cannot be used as an INTO-target of a SELECT/FETCH statement
    How can I get each row of the cursor either as an object or as 'T_TICKET_TRADE' ?
    Thanks,
    Karuna

  • Dynamic Variables and New-Object - in a GUI

    so, i have not found anything that i can parlay into a solution for what i am attempting to do.  
    Basically i am using powershell to build a GUI to manage websites on various servers.  
    in a nutshell:
    - i have an array with the servers i want to query
    - a foreach loop gets me the site names for each server (number of sites can vary on a server).
    - need put checkboxes on a GUI for every site to do something (25-30 sites across 8 servers).
    currently i am passing the $dir.name variable to a function that will create the new variable using this command:
    $pName = $dir.name New-variable -name $pName -value (New-Object System.Windows.Forms.CheckBox)
    $pName.Location -value (New-Object System.Drawing.Size(10,$i))
    $pName.Size -value (New-Object System.Drawing.Size(100,20))
    $Pname.Text -value $dir.name
    $groupBox.Controls.Add($pName) 
    Problem is i am not able to do anything with my newly created variable.  I am trying to use the following code to position the new checkbox but i get nothing (same for text, size, etc.)  I am not seeing any errors, so i don't know what i have going
    wrong.  
    is this even possible?
    I am able to create static checkboxes, and i can create dynamic variables.  But i can't mix the two...

    Here is how we normally use listboxes to handle form situations like this one.  The listboxes can automatically select subgroups.
    The hash of arrays can be loaded very easily with a script or the results of the first list can be used to lookup and set the contents of the second.
    Notice how little code is actually used.  This is all of the setup code needed aside from the from definition:
    $FormEvent_Load={
    $global:serversToSites=@{
    Server1=@('S1_SITE1','S1_SITE2','S1_SITE3')
    Server2=@('S2_SITE1','S2_SITE2','S2_SITE3')
    Server3=@('S3_SITE1','S3_SITE2','S3_SITE3')
    $listbox1.Items.AddRange($serversToSites.Keys)
    $listbox1_SelectedIndexChanged={
    $listbox2.Items.Clear()
    $listbox2.Items.AddRange($global:serversToSites[$listbox1.SelectedItem])
    $listbox2_SelectedIndexChanged={
    [void][System.Windows.Forms.MessageBox]::Show($listbox2.SelectedItem,'You Selected Site')
    Here is the complete demo form:
    [void][reflection.assembly]::Load("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
    [void][reflection.assembly]::Load("System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
    [System.Windows.Forms.Application]::EnableVisualStyles()
    $form1 = New-Object 'System.Windows.Forms.Form'
    $listbox2 = New-Object 'System.Windows.Forms.ListBox'
    $listbox1 = New-Object 'System.Windows.Forms.ListBox'
    $buttonOK = New-Object 'System.Windows.Forms.Button'
    $InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
    $FormEvent_Load={
    $global:serversToSites=@{
    Server1=@('S1_SITE1','S1_SITE2','S1_SITE3')
    Server2=@('S2_SITE1','S2_SITE2','S2_SITE3')
    Server3=@('S3_SITE1','S3_SITE2','S3_SITE3')
    $listbox1.Items.AddRange($serversToSites.Keys)
    $listbox1_SelectedIndexChanged={
    $listbox2.Items.Clear()
    $listbox2.Items.AddRange($global:serversToSites[$listbox1.SelectedItem])
    $listbox2_SelectedIndexChanged={
    [void][System.Windows.Forms.MessageBox]::Show($listbox2.SelectedItem,'You Selected Site')
    $Form_StateCorrection_Load=
    #Correct the initial state of the form to prevent the .Net maximized form issue
    $form1.WindowState = $InitialFormWindowState
    $form1.Controls.Add($listbox2)
    $form1.Controls.Add($listbox1)
    $form1.Controls.Add($buttonOK)
    $form1.AcceptButton = $buttonOK
    $form1.ClientSize = '439, 262'
    $form1.FormBorderStyle = 'FixedDialog'
    $form1.MaximizeBox = $False
    $form1.MinimizeBox = $False
    $form1.Name = "form1"
    $form1.StartPosition = 'CenterScreen'
    $form1.Text = "Form"
    $form1.add_Load($FormEvent_Load)
    # listbox2
    $listbox2.FormattingEnabled = $True
    $listbox2.Location = '237, 26'
    $listbox2.Name = "listbox2"
    $listbox2.Size = '120, 134'
    $listbox2.TabIndex = 2
    $listbox2.add_SelectedIndexChanged($listbox2_SelectedIndexChanged)
    # listbox1
    $listbox1.FormattingEnabled = $True
    $listbox1.Location = '13, 26'
    $listbox1.Name = "listbox1"
    $listbox1.Size = '120, 134'
    $listbox1.TabIndex = 1
    $listbox1.Sorted = $true
    $listbox1.add_SelectedIndexChanged($listbox1_SelectedIndexChanged)
    # buttonOK
    $buttonOK.Anchor = 'Bottom, Right'
    $buttonOK.DialogResult = 'OK'
    $buttonOK.Location = '352, 227'
    $buttonOK.Name = "buttonOK"
    $buttonOK.Size = '75, 23'
    $buttonOK.TabIndex = 0
    $buttonOK.Text = "OK"
    $buttonOK.UseVisualStyleBackColor = $True
    #Save the initial state of the form
    $InitialFormWindowState = $form1.WindowState
    #Init the OnLoad event to correct the initial state of the form
    $form1.add_Load($Form_StateCorrection_Load)
    #Clean up the control events
    $form1.add_FormClosed($Form_Cleanup_FormClosed)
    #Show the Form
    $form1.ShowDialog()
    You can easily substitute  CheckedListbox if you like checkboxes.
    ¯\_(ツ)_/¯

  • Dynamic variables' naming from SendAndLoad

    Hello,
    Been chasing my tail for almost 2days now, I'm having
    problems on how to load dynamically named variables and place it on
    dynamically named movieclips. I'm loading variables from php/mysql
    query thru sendAndLoad (no problem with that). The loaded variables
    are names of swf files that i'm trying to load on dynamically
    numbered movieclips. The problem is it just wont load. I've
    searched the net for similar codes, but with no luck. I'm guessing
    that my error is in getting the exact variable name to load.
    Heylp...

    No problems, you're welcome.
    I think the eval should do the same thing as what I had. I
    can't remember, I don't tend to use eval in flash - don't really
    know why. I think loadMovie also accepts a string argument (which I
    assume it 'evals') for a target in which case it may also work
    without the eval and just with ,"_root.my_movieclip" + i; (didn't
    try it so don't know for sure).
    Good luck with it.

  • Dynamic variable name

    Hi for all.
    I'm need create a object with "dynamic" name. For example
    Object ABCi = new ...
    where i is a indice.
    Please, help-me

    >
    Object ABC[] = new Object [size];
    for (int i=0; i<size;i++) {
    ABC[i] = ....
    }if you do something like this. How do you call one of the instances. How do you know how many there are??
    >
    Dynamic variable name? You're just making problems for
    yourselfIs there a better way? Because sometimes you have to have something like the above. Why is it a big problem?
    Thanks
    Brian

Maybe you are looking for

  • Grouping key Vs Payment method supplement in vendor master data

    Hi All, Could you please explain me as to when we can use grouping key and in what situations to use payment method supplement. They both looks like for grouping open items during payment . I know the config steps for grouping key and payment method

  • MPEG-2 import

    Hi, I am looking to work with the Prelinger Archive and am interested in knowing if there is a way to edit MPEG-2 with iMovie. I tried importing and it just glowed back at me without doing anything. james

  • Creating rules like Outlook in Mail running in Lion

    Hi,    I am on Mac OS X Lion and have configured the new "Mail". I use Outlook in office and find the rules that we can create in Outlook very handy. So was wondering if the same could be achieved in "Mail". The basic requirement is to guide emails f

  • Ctxsrv won't start

    In some situation ctxsrv fails with the following error message: Oracle interMedia Text: Release 8.1.6.0.0 - Production on Fri May 12 12:37:49 20 00 (c) Copyright 1999 Oracle Corporation. All rights reserved. 12:37:49 05/12/00 === OCO server startup

  • Does Netweaver 2004 include XI,if yes, what edition of XI is it?

    Dear all:      I have a stupid question? Does Netweaver 2004 include XI,if yes, what edition of XI is it?      Thank you very much.