For each activity for sibling Loops

Hi All,
I have a below type of xml structrure. I am trying to use XSLT for transforming this format to separate xml which I will to insert data in DB using db adapter
<Loop-2000A>
<Element-628>1</Element-628>
<Element-734 xsi:nil="true"/>
<Element-735>20</Element-735>
<Element-736>1</Element-736>
</Loop-2000A>
<Loop-2000B>
<Element-98>PR</Element-98>
<Element-1065>2</Element-1065>
<Element-1035>ABC PQR</Element-1035>
<Element-1036 xsi:nil="true"/>
<Element-1037 xsi:nil="true"/>
<Element-1038 xsi:nil="true"/>
<Element-1039 xsi:nil="true"/>
<Element-66>PI</Element-66>
<Element-67>953893470</Element-67>
</Loop-2000B>
<Loop-2000B>
<Element-98>PR1</Element-98>
<Element-1065>22</Element-1065>
<Element-1035>abcd DDH</Element-1035>
<Element-1036 xsi:nil="true"/>
<Element-1037 xsi:nil="true"/>
<Element-1038 xsi:nil="true"/>
<Element-1039 xsi:nil="true"/>
<Element-66>PI</Element-66>
<Element-67>953893470</Element-67>
</Loop-2000B>
<Loop-2000B>
<Element-98>PR2</Element-98>
<Element-1065>24</Element-1065>
<Element-1035>pqrDCH</Element-1035>
<Element-1036 xsi:nil="true"/>
<Element-1037 xsi:nil="true"/>
<Element-1038 xsi:nil="true"/>
<Element-1039 xsi:nil="true"/>
<Element-66>PI</Element-66>
<Element-67>953893470</Element-67>
</Loop-2000B>
<Loop-2000A>
<Element-628>1</Element-628>
<Element-734 xsi:nil="true"/>
<Element-735>20</Element-735>
<Element-736>1</Element-736>
</Loop-2000A>
<Loop-2000B>
<Element-98>PL</Element-98>
<Element-1065>12</Element-1065>
<Element-1035>RAS BKU</Element-1035>
<Element-1036 xsi:nil="true"/>
<Element-1037 xsi:nil="true"/>
<Element-1038 xsi:nil="true"/>
<Element-1039 xsi:nil="true"/>
<Element-66>PI</Element-66>
<Element-67>953893470</Element-67>
</Loop-2000B>
<Loop-2000B>
<Element-98>PS2</Element-98>
<Element-1065>28</Element-1065>
<Element-1035>pqrDMH</Element-1035>
<Element-1036 xsi:nil="true"/>
<Element-1037 xsi:nil="true"/>
<Element-1038 xsi:nil="true"/>
<Element-1039 xsi:nil="true"/>
<Element-66>PI</Element-66>
<Element-67>953893470</Element-67>
</Loop-2000B>
In this case LOOP-2000A reprsents hospitals.while LOOP-2000B represents patients.One hospital can have multiple patients.Though in xml,LOOP-2000B is not child of LOOP-2000A. Actually it is like that:one LOOP-2000A is followed by many LOOP-2000B..that means one hospital has that many patients.Then next loop 2000A is followed by another set of LOOP 2000B which represents next hospital has that many patients.
I have a requirement where I need to insert records in DB,where each patient will have one record in DB.I am trying to use for-each at loop 2000A and subsequently for-each at LOOP-2000B,but it is not working.It is not iterating on next set of patients.It is always copying the same patient.
Any pointers in this regard will be helpful.

The xml was,
<ns:A xmlns ns="A">
<ns:a>1</ns:a>
<ns:a>2</ns:a>
<ns:a>3</ns:a>
<ns:A>
Edited by: Prabu on Aug 30, 2010 12:55 PM
Edited by: Prabu on Aug 30, 2010 12:55 PM
Edited by: Prabu on Aug 30, 2010 12:56 PM

Similar Messages

  • Need new result file for each iteration of a loop

    I am using TestStand 2010 SP1.  I have a main sequence that essentially does the following:
    Initialize the test equipment and set up the test environment [Sequence Call]
    Start Loop
    Run Tests [Sequence Call]
    End Loop
    Because testing can continue for hours, the resultant report file is enormous and difficult to evaluate. I need to create a new result file for each loop iteration.  I know that starting a new execution of “Run Tests” will create a result file for each iteration of the loop, but the new execution will not have access to the handles to the test equipment that were made during initialization.  The testing is time critical, therefore initializing the test equipment and setting up the test environment must occur outside of the loop. 
    How can I programmatically create a new result file at the beginning of the loop and close the result file at the end of the loop?  I am open to any other suggestions.  Thank you in advance for your help!

    Hi,
    You could modify your process model by making a copy of Test UUTs entry point. Then make the loop that usually tests multiple UUTs into your loop. Take the loop and init out of your sequence. You can init in PreUUTLoop or the other pre loop sequence, and maybe store your references in runstate.root.Locals and pass them to MainSequence. Then you can use Report Options to set it for separate report files.
    cc

  • For...each...in loop.  Can I make assumptions about the order?

    I've always assumed that I can't make any assumptions about the order in which elements are indexed by a for...each...in loop.  Not even for a conventional indexed array.  (Emphasis!: I'm not talking about associative arrays here, I'm talking about normal indexed arrays.  Dense, no gaps.).
    for each (var element:ElementClass in myArray) {}
    May not traverse the array from first to last.  I've never assumed that it's guaranteed anyway.  Neither does the ECMA standard.  I assume the compiler/runtime is at liberty to index the array in any order, which may even be different each time. 
    Whereas... for (var i:int=0;i<myArray.length;i++) {......var element:ElementClass=myArray[i]....}
    ....Is guaranteed to traverse the array from first to last.  So I always use this looping statement if the ordering is important.
    MY QUESTION IS.... In ActionScript 3, Can I just assume that the for..each..in will always traverse a dense indexed array from first to last?
    Actually, my specific case at the moment is where another programmer is passing me an array,assembled within a for...each..in loop.   But I need to assume the order of that array.  If this is always going to work in ActionScript3, then no problem.  Although I'll continue to worry about the ECMA standard for my own code, and wont make assumptions about ordering - but I won't force my anal-retentive programming style on the other guy.

    I did a test on it
    case1:
    var arr:Array = new Array();
    arr[0] = 'a';
    arr[1] = 'b';
    arr[2] = 'c';
    arr[3] = 'd';
    for each(var arrEle:string in arr)
         trace(arrEle);
    always output a,b,c,d
    case2:
    var arr:Array = new Array();
    arr[6] = 'd';
    arr[0] = 'a';
    arr[1] = 'b';
    arr[3] = 'c';
    for each(var arrEle:string in arr)
         trace(arrEle);
    always output a,b,d,c
    so I assume array is created in this way: alloc a memory block for array first, when attaching new element(numeric indexd by i) to array, check if i >= length, put new element in the end of array, else put element at i; so in case 2, array is alloced in this way
    array:{'d'} //6>0
    array:{'a', 'd'} //0<1
    array:{'a', 'b', 'd'} //1<2
    array:{'a', 'b', 'd', 'c'} //3>=3
    disclaimer: totally assumption!!!

  • Activity cost-for each activity of individual operation

    Hi, in co02, cost view, analysis, shows the cost of each activity of all opeartions. say, if we have 6 opeartions, it will show the setup cost, machine cost, labor cost individually for all 6 operations. if we wants to see setup cost (etc) of individual opeartion. what are the settings req for that. pls help.

    Dear,
    KKBC_HOE or KKBC_ORD report you get all production order cost Plan /Actual.
    Or for operational cost  you need to develop report with the help of ABAP.
    Regards,
    R.Brahmankar

  • New field NOTES required for each activity listed in BP factsheet

    Hi Experts.
    We are trying to have a new field NOTES for each activity listed in BP factsheet. For activity we have several fields like description, status , dates etc but notes (long text) is not there for the activity.
    Could anyone help us out.
    Regards,
    Rahul

    Hi Saumya,
    I want to use the standard activity notes field here.
    My requirement is to display the column Activity notes in activities assigment block of account Factsheet.
    BP_Factshheet/Activities is the view and the Context node BUILACTIVITY does not have the attribute activity notes.
    Please give your inputs
    Regards,
    Rahul

  • Best organizing practice for Apple Loops

    Did a search for this, but to no avail.
    I recently bought some big fish apple loops. They import beautifully using drag and drop, except for one thing:
    On the big fish DVD, each folder of the loop is called something non-descript, like 'Eflat40bpmfull'. So in the loops browser, it's not really possible to search for some of these things, unless you have the original DVD open and know what you're looking for.
    So how best to import these - or am I just not using the loops browser in the right way? One idea I had was to change the names of the loops before importing them, so they would be easier to locate, but I'm unsure if that destroys any of the looping tags on them.
    Thoughts?

    Hi Peter,
    I don't think renaming them will destroy the metadata (tags).
    If its a hassle renaming every one, maybe a workaround to aid searching, assuming they've come in various sub-folders depending on their content would be to drag & drop them onto the loop browser whilst inside their various folders, giving the folders descriptive names e.g. 'bigfish guitars' & 'bigfish drumfills' - then although the samples would still have their slighty useless names at least you could choose a folder from the jampack organiser drop down menu in the loop browser & flick through a lesser number of slightly uselessly named loops that are at least in the right ballpark for the type of thing you're looking for?
    I do find it annoying when sample banks aren't practically named - although samplemagic do seem to have got it right on this count from what I've seen
    Cheers
    Adam

  • For Next loop in allocations

    Request help in writing a allocation logic code.
    The current runs for 2600 Projects and 12000 customers. This causes memory issue and the code is aborted when run.
    Please suggest if this code can be run in a For/Next loop for each project..
    *XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *WHEN ACCOUNT
    *IS "A1100001"
    *REC(EXPRESSION = ([ACCOUNT].[A1100001])*((%VALUE%)),ACCOUNT = "A3100001")
    *ENDWHEN
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *XDIM_MEMBERSET ACCOUNT = BAS(MET-SAL.3.1)
    *XDIM_MEMBERSET P_PROJECT = BAS(AllProjects)
    *XDIM_ADDMEMBERSET P_PROJECT = NO_PROJECT
    *XDIM_MEMBERSET P_DEPARTMENT = ESG_Input
    *XDIM_MEMBERSET P_ENTITY = TTEU_INP
    *XDIM_MEMBERSET P_CUSTOMER = No_Customer
    *XDIM_ADDMEMBERSET P_CUSTOMER = BAS(AllCustomers)
    *XDIM_MEMBERSET P_ANALYSIS = BAS(AllAnalysis)
    *XDIM_ADDMEMBERSET P_ANALYSIS = NO_ANALYSIS
    *RUNALLOCATION
    *FACTOR = 1
    *DIM ACCOUNT WHAT = BAS(MET-SAL.3.1) ; WHERE = <<<;USING = <<<;TOTAL = <<<
    *DIM P_PROJECT WHAT = NO_PROJECT ;WHERE = <<< ;USING = <<<;TOTAL = <<< 
    *DIM P_DEPARTMENT WHAT = ESG_Input ;WHERE = <<< ;USING = <<<;TOTAL = <<< 
    *DIM P_ENTITY WHAT = TTEU_INP ;WHERE = <<< ;USING = <<<;TOTAL = <<< 
    *DIM P_ANALYSIS WHAT = NO_ANALYSIS ;WHERE = BAS(AllAnalysis) ;USING = <<<;TOTAL = <<< 
    *DIM P_CUSTOMER WHAT = No_Customer ;WHERE = BAS(AllCustomers) ;USING = <<<;TOTAL = <<<
    *ENDALLOCATION
    next

    I realized that while checking and have removed the section for recording expression.. and now only focusing to correct the Allocation logic. Based on your advice I have added the FOR/NEXT as below.
    The code is now only running for EDCTM-0007 but fails to generate any records for EDCTM-0014.
    *XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
    *XDIM_MEMBERSET TIME = %TIME_SET%
    *XDIM_MEMBERSET ACCOUNT AS %SAL% = BAS(MET-SAL.3.1)
    //*XDIM_MEMBERSET P_PROJECT = BAS(AllProjects)
    *XDIM_MEMBERSET P_PROJECT AS %PRJ% = EDCTM-0007, EDCTM-0014
    *XDIM_ADDMEMBERSET P_PROJECT = NO_PROJECT
    *XDIM_MEMBERSET P_DEPARTMENT = BAS(AllDepartments)
    *XDIM_MEMBERSET P_ENTITY = BAS(AllEntities)
    *XDIM_MEMBERSET P_CUSTOMER = BAS(AllCustomers)
    *XDIM_MEMBERSET P_ANALYSIS = BAS(AllAnalysis)
    *XDIM_MEMBERSET RPTCURRENCY = INR, CAD, EUR, GBP, KRW, MXN, SGD, THB, USD
    *FOR %PRJ% = EDCTM-0007, EDCTM-0014
    *RUNALLOCATION
    *FACTOR = 1
    *DIM ACCOUNT WHAT = %SAL%; WHERE = <<<; USING = <<<; TOTAL = <<<
    *DIM P_DEPARTMENT WHAT = ED_Input; WHERE = ED16; USING = <<<; TOTAL = <<<
    *DIM P_ENTITY WHAT = PUN_C; WHERE = <<<; USING = <<<; TOTAL = <<<
    *DIM P_CUSTOMER WHAT = No_Customer; WHERE = C100700; USING = <<<; TOTAL = <<<
    *DIM P_PROJECT WHAT = NO_PROJECT; WHERE = %PRJ%; USING = <<<; TOTAL = <<<
    *DIM P_ANALYSIS WHAT = NO_ANALYSIS; WHERE = TM_S; USING = <<<; TOTAL = <<<
    *ENDALLOCATION
    *COMMIT
    *NEXT
    log..
       FILE:\ROOT\WEBFOLDERS\ENVIRONMENTSHELL1\ADMINAPP\Planning_TTL\CP_RAVINNINE.LGF
    USER:RAVINDRA.S
    APPSET:ENVIRONMENTSHELL1
    APPLICATION:Planning_TTL
    FACTOR:1
    ALLOCATION DATA REGION:
    CATEGORY:Budget,
    P_PROJECT:NO_PROJECT,
    P_DEPARTMENT:Admin_Entity,Admin_Group,BRT_Entity,CEO_Entity,CEO_Group,COO_Entity,COO_Group,CSR_Entity,CSR_Group,ED01,ED02,ED03,ED04,ED05,ED06,ED07,ED08,ED09,ED10,ED11,ED12,ED13,ED14,ED15,ED16,ED_Input,ESG01,ESG02,ESG03,ESG04,ESG05,ESG06,ESG07,ESG08,ESG09,ESG10,ESG_Input,Finance_Entity,Finance_Group,GDO_Entity,HR_Entity,HR_Group,IT_Ent_Apps_Entity,IT_Ent_Apps_Group,IT_Ops_Infra_Entity,IT_Ops_Infra_Group,Legal_Entity,Legal_Group,Mktg_Entity,Mktg_Group,NO_DEPT,OSM_Entity,OSM_Group,PL01,PL02,PL03,PL04,PL05,PL06,PL07,PL08,PL09,PLM_P_Input,PLM_P_Services_Input,PLM_S_Input,PP01,PP02,PP03,PP04,PP05,Products_Autodesk,Products_Dassault,Products_IBM,Products_IKS,Products_MSC,Products_Others,Products_UGS,Quality_Entity,Quality_Group,VP01,VPD01,VPD_Input,
    P_ENTITY:BLO_C,BLO_Input,BLO_NC,BLR_C,BLR_Input,BLR_NC,BOM_C,BOM_Input,BOM_NC,BRG_C,BRG_Input,BRG_NC,BRZ_C,BRZ_Input,BRZ_NC,CAN,DEL_C,DEL_Input,DEL_NC,GER,GIP,HNJ_C,HNJ_Input,HNJ_NC,JSE_C,JSE_Input,JSE_NC,JSR_C,JSR_Input,JSR_NC,LKQ_C,LKQ_Input,LKQ_NC,MEX,NLD,PNQ_C,PNQ_Input,PNQ_NC,PUD_C,PUD_Input,PUD_NC,PUN_C,PUN_Input,PUN_NC,SAS,SIG,SKR,THD,THE,TTCN_INP,TTEU_INP,TTL_INP,TTMX_INP,TTPL_INP,TTTH_INP,TTUS_INP,UKG_Input,UKG_J,UKG_N,USA,
    P_CUSTOMER:C000001,C000002,C000003,C000004,C000005,C000006,C000007,C000008,C000009,C000010,C000011,C000012,C000013,C000014,C000015,C000016,C000017,C000018,C000019,C000020,C000021,C000022,C000023,C000024,C000025,C000026,C000027,C000028,C000029,C000030,C000031,C000032,C000033,C000034,C000035,C000036,C000037,C000038,C000039,C000040,C000041,C000042,C000043,C000044,C000045,C000046,C000047,C000048,C000049,C000050,C000051,C000052,C000053,C000054,C000055,C000056,C000057,C000058,C000059,C000060,C000061,C000062,C000063,C000064,C000065,C000066,C000067,C000068,C000069,C000070,C000071,C000072,C000073,C000074,C000075,C000076,C000077,C000078,C000079,C000080,C000081,C000082,C000083,C000084,C000085,C000086,C000087,C000088,C000089,C000090,C000091,C000092,C000093,C000094,C000095,C000096,C000097,C000098,C000099,C000100,C000101,C000102,C000103,C000104,C000105,C000106,C000107,C000108,C000109,C000110,C000111,C000112,C000113,C000114,C000115,C000116,C000117,C000118,C000119,C000120,C000121,C000122,C000123,C000124,C000125,C000126,C000127,C000128,C000129,C000130,C000131,C000132,C000133,C000134,C000135,C000136,C000137,C000138,C000139,C000140,C000141,C000142,C000143,C000144,C000145,C000146,C000147,C000148,C000149,C000150,C000151,C000152,C000153,C000154,C000155,C000156,C000157,C000158,C000159,C000160,C000161,C000162,C000163,C000164,C000165,C000166,C000167,C000168,C000169,C000170,C000171,C000172,C000173,C000174,C000175,C000176,C000177,C000178,C000179,C000180,C000181,C000182,C000183,C000184,C000185,C000186,C000187,C000188,C000189,C000190,C000191,C000192,C000193,C000194,C000195,C000196,C000197,C000198,C000199,C000200,C000201,C000202,C000203,C000204,C000205,C000206,C000207,C000208,C000209,C000210,C000211,C000212,C000213,C000214,C000215,C000216,C000217,C000218,C000219,C000220,C000221,C000222,C000223,C000224,C000225,C000226,C000227,C000228,C000229,C000230,C000231,C000232,C000233,C000234,C000235,C000236,C000237,C000238,C000239,C000240,C000241,C000242,C000243,C000244,C000245,C000246,C000247,C000248,C000249,C000250,C000251,C000252,C000253,C000254,C0002
    P_ANALYSIS:FB_M,FB_S,NO_ANALYSIS,TM_M,TM_S,
    RPTCURRENCY:CAD,EUR,GBP,INR,KRW,MXN,SGD,THB,USD,
    ACCOUNT:WHAT:MET-SAL.1.1,MET-SAL.5.1, MET-SAL.1.2,MET-SAL.5.2, MET-SAL.1.3,MET-SAL.5.3, MET-SAL.1.4,MET-SAL.5.4, MET-SAL.1.5,MET-SAL.5.5, MET-SAL.1.6,MET-SAL.5.6, MET-SAL.1.7,MET-SAL.5.7, MET-SAL.1.8,MET-SAL.5.8,WHERE:<<<,USING:<<<,TOTAL:<<<
    P_DEPARTMENT:WHAT:ED_Input,WHERE:ED16,USING:<<<,TOTAL:<<<
    P_ENTITY:WHAT:PUN_C,WHERE:<<<,USING:<<<,TOTAL:<<<
    P_CUSTOMER:WHAT:No_Customer,WHERE:C100700,USING:<<<,TOTAL:<<<
    P_PROJECT:WHAT:NO_PROJECT,WHERE:EDCTM-0007,USING:<<<,TOTAL:<<<
    P_ANALYSIS:WHAT:NO_ANALYSIS,WHERE:TM_S,USING:<<<,TOTAL:<<<
    --Read WHAT region
    [P_DEPARTMENT] =ED_Input
    [P_CUSTOMER] =No_Customer
    [P_PROJECT] =NO_PROJECT
    [P_ANALYSIS] =NO_ANALYSIS
    [CATEGORY] =Budget
    [RPTCURRENCY] =CAD,EUR,GBP,INR,KRW
    --Time to load WHAT :0.2066 second(s).
    WHAT data:1680 records.
    --Apply factor
    WHERE=WHAT *1
    --Time to apply factor :0.003074 second(s).
    --Read destination and calculate difference
    [P_DEPARTMENT] =ED16
    [P_CUSTOMER] =C100700
    [P_PROJECT] =EDCTM-0007
    [P_ANALYSIS] =TM_S
    [CATEGORY] =Budget
    [RPTCURRENCY] =CAD,EUR,GBP,INR,KRW
    --Time to read destination and calculate difference :0.14611 second(s).
    --Records succeeded to write back :1680
    --Records failed to write back
    --Time to run Allocation :0.390015 second(s).
    FACTOR:1
    ALLOCATION DATA REGION:
    CATEGORY:Budget,
    ACCOUNT:WHAT:MET-SAL.1.1,MET-SAL.5.1, MET-SAL.1.2,MET-SAL.5.2, MET-SAL.1.3,MET-SAL.5.3, MET-SAL.1.4,MET-SAL.5.4, MET-SAL.1.5,MET-SAL.5.5, MET-SAL.1.6,MET-SAL.5.6, MET-SAL.1.7,MET-SAL.5.7, MET-SAL.1.8,MET-SAL.5.8,WHERE:<<<,USING:<<<,TOTAL:<<<
    P_DEPARTMENT:WHAT:ED_Input,WHERE:ED16,USING:<<<,TOTAL:<<<
    P_ENTITY:WHAT:PUN_C,WHERE:<<<,USING:<<<,TOTAL:<<<
    P_CUSTOMER:WHAT:No_Customer,WHERE:C100700,USING:<<<,TOTAL:<<<
    P_PROJECT:WHAT:NO_PROJECT,WHERE:EDCTM-0014,USING:<<<,TOTAL:<<<
    P_ANALYSIS:WHAT:NO_ANALYSIS,WHERE:TM_S,USING:<<<,TOTAL:<<<
    "LC" has been added as default currency in allocation.
    --Read WHAT region
    [P_DEPARTMENT] =ED_Input
    [P_CUSTOMER] =No_Customer
    [P_PROJECT] =NO_PROJECT
    [P_ANALYSIS] =NO_ANALYSIS
    [CATEGORY] =Budget
    [ACCOUNT] =MET-SAL.1.1,MET-SAL.1.2,MET-SAL.1.3,MET-SAL.1.4,MET-SAL.1.5
    --Time to load WHAT :0.060259 second(s).
    WHAT data:0 records.
    --Apply factor
    WHERE=WHAT *1
    --Time to apply factor :0.000028 second(s).
    --Read destination and calculate difference
    [P_DEPARTMENT] =ED16
    [P_CUSTOMER] =C100700
    [P_PROJECT] =EDCTM-0014
    [P_ANALYSIS] =TM_S
    [CATEGORY] =Budget
    [ACCOUNT] =MET-SAL.1.1,MET-SAL.1.2,MET-SAL.1.3,MET-SAL.1.4,MET-SAL.1.5
    --Time to read destination and calculate difference :0.05125 second(s).
    --Records succeeded to write back
    regards, Prashant

  • I have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    i have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    Hi fais,
    Following through with what JB suggested. The steps involved in replacing the inner for loop with a while loop are outlined below.
    You can replace the inner for loop with a while by doing the following.
    1) Right-click of the for loop and select "Repalce" then navigate to the "while loop".
    2) Make sure the tunnels you where indexing on with the for loop are still indexing.
    3) Drop an "array size" node on your diagram. Wire the array that determines the number of iterations your for loop executes into this "array size".
    4) Wire the output of the array size into the new while loop.
    5) Set the condition terminal to "stop if true".
    6)Drop an "OR" gate inside the while loop and wire its output to the while loops condition terminal.
    7) C
    reate a local of the boolean "stop" button, and wire it into one of the inputs of your OR gate. This will allow you to stop the inner loop.
    8) Drop a "less than" node inside the inner while loop.
    9) Wire your iteration count into the bottom input of the "less than".
    10) Wire the count (see step 4 above) into the top input of the less than. This will stop the inner loop when ever the inner loop has processed the last element of your array.
    Provided I have not mixed up my tops and bottoms this should accomplish the replacement.
    I will let others explain how to takle this task using the "case solution".
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Syntax for a loop

    Hey folks,
    I've heard about for loops being the best way to accomplish what I need. With my coding level, i'm looking to have that when all the checkbox states are true, then go to a specific frame.  the issue is when I was using event listeners inside each of the mouse click events, it would trigger on the ninth click as all conditions would have been met. The syntax for a loop appears daunting, is there any way to execute my function so it's always "listening" or will execute eimmeidatley if the conditions are met?
    OFbandSEVENclose.addEventListener(MouseEvent.CLICK, OnFRYERbandSEVENclose);
    function OnFRYERbandSEVENclose(e: MouseEvent): void
    gotoAndPlay(1);
    OFbandSEVENcheckONE.visible = false;
    OFbandSEVENcheckTWO.visible = false;
    OFbandSEVENcheckTHREE.visible = false;
    OFbandSEVENcheckFOUR.visible = false;
    OFbandSEVENcheckFIVE.visible = false;
    OFbandSEVENcheckSIX.visible = false;
    OFbandSEVENcheckSEVEN.visible = false;
    OFbandSEVENcheckEIGHT.visible = false;
    OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, checkbuttonONE, false, 0, true);
    function checkbuttonONE(e:Event):void
        if( OFbandSEVENcheckONE.visible == true){
            OFbandSEVENcheckONE.visible = false;
        }else{
            OFbandSEVENcheckONE.visible = true;
    OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, checkbuttonTWO, false, 0, true);
    function checkbuttonTWO(e:Event):void
        if( OFbandSEVENcheckTWO.visible == true){
            OFbandSEVENcheckTWO.visible = false;
        }else{
            OFbandSEVENcheckTWO.visible = true;
    OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, checkbuttonTHREE, false, 0, true);
    function checkbuttonTHREE(e:Event):void
        if( OFbandSEVENcheckTHREE.visible == true){
            OFbandSEVENcheckTHREE.visible = false;
        }else{
            OFbandSEVENcheckTHREE.visible = true;
    OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, checkbuttonFOUR, false, 0, true);
    function checkbuttonFOUR(e:Event):void
        if( OFbandSEVENcheckFOUR.visible == true){
            OFbandSEVENcheckFOUR.visible = false;
        }else{
            OFbandSEVENcheckFOUR.visible = true;
    OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, checkbuttonFIVE, false, 0, true);
    function checkbuttonFIVE(e:Event):void
        if( OFbandSEVENcheckFIVE.visible == true){
            OFbandSEVENcheckFIVE.visible = false;
        }else{
            OFbandSEVENcheckFIVE.visible = true;
    OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, checkbuttonSIX, false, 0, true);
    function checkbuttonSIX(e:Event):void
        if( OFbandSEVENcheckSIX.visible == true){
            OFbandSEVENcheckSIX.visible = false;
        }else{
            OFbandSEVENcheckSIX.visible = true;
    OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, checkbuttonSEVEN, false, 0, true);
    function checkbuttonSEVEN(e:Event):void
        if( OFbandSEVENcheckSEVEN.visible == true){
            OFbandSEVENcheckSEVEN.visible = false;
        }else{
            OFbandSEVENcheckSEVEN.visible = true;
    OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, checkbuttonEIGHT, false, 0, true);
    function checkbuttonEIGHT(e:Event):void
        if( OFbandSEVENcheckEIGHT.visible == true){
            OFbandSEVENcheckEIGHT.visible = false;
        }else{
            OFbandSEVENcheckEIGHT.visible = true;
    // SHOW FINAL SCREEN===============================================
    function OFbandSEVENCOMPLETE(e:Event):void
        if( OFbandSEVENcheckONE.visible == true && OFbandSEVENcheckTWO.visible == true && OFbandSEVENcheckTHREE.visible == true&& OFbandSEVENcheckFOUR.visible == true && OFbandSEVENcheckFIVE.visible == true && OFbandSEVENcheckSIX.visible == true && OFbandSEVENcheckSEVEN.visible == true && OFbandSEVENcheckEIGHT.visible == true){
            gotoAndPlay(12);
    stop();

    Yes all are on one frame, the movieclips for the checkmark and the buttons that trigger the checkmark. I put your code in and my ubttons still trigger the checkmarks to go visible but there is nothing signalling the end. basically just need it to go to frame 12. Here's my mods below
    OFbandSEVENclose.addEventListener(MouseEvent.CLICK, OnFRYERbandSEVENclose);
    function OnFRYERbandSEVENclose(e: MouseEvent): void
    gotoAndPlay(1);
    OFbandSEVENcheckONE.visible = false;
    OFbandSEVENcheckTWO.visible = false;
    OFbandSEVENcheckTHREE.visible = false;
    OFbandSEVENcheckFOUR.visible = false;
    OFbandSEVENcheckFIVE.visible = false;
    OFbandSEVENcheckSIX.visible = false;
    OFbandSEVENcheckSEVEN.visible = false;
    OFbandSEVENcheckEIGHT.visible = false;
    var checks:Array = new Array(OFbandSEVENcheckONE, OFbandSEVENcheckTWO, OFbandSEVENcheckTHREE, OFbandSEVENcheckFOUR, OFbandSEVENcheckFIVE, OFbandSEVENcheckSIX, OFbandSEVENcheckSEVEN, OFbandSEVENcheckEIGHT); 
    OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, doCheck);  //buttons to click that trigger the checkbox movieclips
    OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, doCheck); 
    function doCheck(e:MouseEvent):void
      var sel:Boolean = true;
      for(var i:int = 0; i < checks.length; i++){
           if(!checks[i].visible){
                sel = false;
                break;
      if(sel){
           trace("all selected");
    OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, checkbuttonONE, false, 0, true);
    function checkbuttonONE(e:Event):void
        if( OFbandSEVENcheckONE.visible == true){
            OFbandSEVENcheckONE.visible = false;
        }else{
            OFbandSEVENcheckONE.visible = true;
    OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, checkbuttonTWO, false, 0, true);
    function checkbuttonTWO(e:Event):void
        if( OFbandSEVENcheckTWO.visible == true){
            OFbandSEVENcheckTWO.visible = false;
        }else{
            OFbandSEVENcheckTWO.visible = true;
    OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, checkbuttonTHREE, false, 0, true);
    function checkbuttonTHREE(e:Event):void
        if( OFbandSEVENcheckTHREE.visible == true){
            OFbandSEVENcheckTHREE.visible = false;
        }else{
            OFbandSEVENcheckTHREE.visible = true;
    OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, checkbuttonFOUR, false, 0, true);
    function checkbuttonFOUR(e:Event):void
        if( OFbandSEVENcheckFOUR.visible == true){
            OFbandSEVENcheckFOUR.visible = false;
        }else{
            OFbandSEVENcheckFOUR.visible = true;
    OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, checkbuttonFIVE, false, 0, true);
    function checkbuttonFIVE(e:Event):void
        if( OFbandSEVENcheckFIVE.visible == true){
            OFbandSEVENcheckFIVE.visible = false;
        }else{
            OFbandSEVENcheckFIVE.visible = true;
    OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, checkbuttonSIX, false, 0, true);
    function checkbuttonSIX(e:Event):void
        if( OFbandSEVENcheckSIX.visible == true){
            OFbandSEVENcheckSIX.visible = false;
        }else{
            OFbandSEVENcheckSIX.visible = true;
    OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, checkbuttonSEVEN, false, 0, true);
    function checkbuttonSEVEN(e:Event):void
        if( OFbandSEVENcheckSEVEN.visible == true){
            OFbandSEVENcheckSEVEN.visible = false;
        }else{
            OFbandSEVENcheckSEVEN.visible = true;
    OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, checkbuttonEIGHT, false, 0, true);
    function checkbuttonEIGHT(e:Event):void
        if( OFbandSEVENcheckEIGHT.visible == true){
            OFbandSEVENcheckEIGHT.visible = false;
        }else{
            OFbandSEVENcheckEIGHT.visible = true;
    // SHOW FINAL SCREEN===============================================
    function OFbandSEVENCOMPLETE(e:Event):void
        if( OFbandSEVENcheckONE.visible == true && OFbandSEVENcheckTWO.visible == true && OFbandSEVENcheckTHREE.visible == true&& OFbandSEVENcheckFOUR.visible == true && OFbandSEVENcheckFIVE.visible == true && OFbandSEVENcheckSIX.visible == true && OFbandSEVENcheckSEVEN.visible == true && OFbandSEVENcheckEIGHT.visible == true){
            gotoAndPlay(12);
    stop();

  • Highest speed for a loop in the microprocessor of my CRIO?

    Hello:
    Im trying to develop a control system for an inverter with with my CRIO 9022, the speed of my system is 10 kHz(the switching frequency for the inverter is 10 kHz).
    Im trying to develop the controller using the microprocesor, but I was reading that the highest speed achievable for a loop in the microprocessor is around 1 Khz, is this true?
    If is it, how can I develop a control with a loop of 10 Khz? this speed is only achievable using the FPGA?
    Thanks a lot!
    Regards

    Sorry for dont attach the subVI, but the calculation that I perform inside are not diffcult, the first one is only aritmetic calculations and the second one is a PID (I attach them).
    Maybe I can try to move them to the FPGA, but would be very tedious because I need huge times for compile and if I want to make any change will be very more difficult.
    Do you think that the processor can not carry out these loop a higher speed than 400 Hz?
    Thanks
    Attachments:
    SubVI1.PNG ‏50 KB
    SubVI2(PID).PNG ‏81 KB

  • Creating new 'category/index' for apple loops in logic

    As well as the standard apple loops, I currently have an additional apple loops jampack & a number of self-made apple loops.
    These have been indexed automatically, & can be referenced via the drop-down on the top right of the loop browser as 'jampack' & 'my loops' respectively.
    I've just bought a 3rd party dvd of apple loops, & would like to be able to reference these via the same kind of category in the loopbrowser drop down, however, the 3rd party DVD has no 'installer' like the official jampack, but instead just has folders of 'apple-loopyfied' AIFFs to drop in the loop browser.
    I assume if this is the case they will appear by default under 'my loops', which isn't ideal - is there a way I can manually create another category(/folder?) for these loops which I can reference via Logic's loop browser drop-down?
    Any help appreciated
    Adam

    ok, still stuck on this but have found the following from page 61 on 'new in logic 7.2'
    http://manuals.info.apple.com/en/NewFeatures_in_Logic_Pro7.2.pdf
    'To keep things tidy, the loop browser offers advanced loop management tools, the jam pack management drop-down allows you to limit the display to loops from a specific jam pack, or other folder' .....then....describing an option from the pull-down, 'vendor x - choose to play loops from a specific third party vendor'
    - this looks perfect for what i want to do, but i assume a vendor must include certain data/meta-data in their loops for this indexing to work & display under vendor x as a dropdown, how do i know if the dvd I have bought will have this? hmmmm....

  • How to get the last error for while loop?

    How to get the last error for while loop? I just want transfer the last error for while loop, but the program use the shift register shift all error every cycle.

    What do you mean by "get" and "transfer"?
    If the shift register is not what you want, use a plan tunnel instead.
    Typically, programmers are interested in the first, not last, error.
    Can you show us your code so we have a better idea what you are trying to?
    LabVIEW Champion . Do more with less code and in less time .

  • System identifica​tion for open loop unstable plant?

    Hello,
    I have been trying to use system identification on labview. My problem is that my plant is open loop unstable and none of the tutorials or examples I have found seem to cover this so I cannot get it to work. Does anyone have any suggestions as to how I should go about it? My plant has an RC servo so it needs a PWM signal to stimulate it.
    Thanks
    Adam

    adamkse wrote:
    I want to control my plant with lead/lag control but I do not know the plant model which makes this very difficult. I cannot theoretically calculate it because the information I need to obtain a numerical transfer function or state space model is unavailable.
    I have it controlled with PID at the moment but this is not ideal.
    I am trying to use the system identification toolkit to obtain a transfer function but I do not know what to do because the examples do not work for open loop unstable plants.
    Adam
    Ok Open loop unstable functions cannot be predictably controlled (hence the terms; open loop and unstable,)  Not being able to model the actions is a bit of a problem too.
    Somehow, someway you need to get some kind of model or some kind of feedback to either provide stability in the plant or close the loop.
    Adding hardware (sensors) is the most likely solution.
    tell me more about the plant, I do this kind of thing for a living, so I could offer some ideas. 
    Jeff

  • FOR/NEXT loop produces Error in ProcessSQL: Subscript out of range

    Hi all,
    The 2nd FOR/NEXT loop in the following code produces Subscript ouf of Range error:
    *LOOKUP RATEAPP
    *DIM MODEL:RATEENTITYDIM= DRIVEDIM.DRIVER_ENTITY
    *DIM MODEL:RATEACCOUNTDIM= DRIVEDIM.DRIVER
    *DIM MODEL:INPUTCURRENCYDIM = "EUR"
    *ENDLOOKUP
    // Select lookup and normal members by group
    *SELECT(%DRIVERSA%, ID, DRIVEDIM, "[GROUP] = 'A' AND [DRIVER] <> ''")
    *SELECT(%MANUALSA%,ID,DRIVEDIM, "[GROUP] = 'A' AND [SOURCE] = 'MAN'")
    *XDIM_MEMBERSET DRIVEDIM= %MANUALSA%, "U_TEMP"
    *WHEN ACCOUNTDIM.ACCTYPE
    *IS *
         *REC(EXPRESSION=1, NOADD, DRIVEDIM="U_TEMP")
    *ENDWHEN
    *GO
    // this is ok
    *FOR %MANSET% = %MANUALSA%
         *WHEN DRIVEDIM
         *IS %MANSET%
         *WHEN %VALUE%
         *IS <> 0
                   *REC(FACTOR=GET(DRIVEDIM="AD.TEMP"),DRIVEDIM="AD.TEMP")
         *ENDWHEN
         *ENDWHEN
    *GO
    *NEXT
    *XDIM_MEMBERSET DRIVEDIM= %DRIVERSA%, "U_TEMP"
    // this is not OK
    *FOR %DRIVSET% = %DRIVERSA%
         *WHEN DRIVEDIM
         *IS %DRIVSET%
              *WHEN %VALUE%
              *IS <> 0
                   *REC(FACTOR= GET(DRIVEDIM="U_TEMP") * LOOKUP(MODEL),DRIVEDIM="U_TEMP") //  * LOOKUP(MODEL)
              *ENDWHEN
         *ENDWHEN
    *GO
    *NEXT
    If I remove the FOR/NEXT loop, this runs fine. The error occurs everywhere - in logic debugger, in DB, in ExecuteBaseLogic if included in Default logic. The REC statement inside the loop can be anything, even as simple REC(FACTOR=1,DRIVEDIM="U_TEMP"), so the problem is in the loop, not anything else. It validates nicely and the compiled logic looks just as expected.
    This error could occur sometimes if the membersets are too large. However, in this example, the number of members is rather limited. In the debugger is is possible to limit the data region to single specific intersection and the DRIVEDIM membersets combined is exacly 15.
    Could it be possible that the error is caused by member ID-s like AD.1.AVGWAGEGROWTH (length=18)? Is there anything else that can cause  trouble?
    Any ideas appreciated.
    Thanks
    Madis
    Edited by: Madis Udam on Mar 24, 2011 11:06 AM

    I don't think you should have"." dot's in you ID's.
    think about it, in your code you have ACCOUNTDIM.ACCTYPE, which represents the account type of the dimension.
    If you have an id "AD.1.AVGWAGEGROWTH"; wouldn't it think that you are trying the get a value of some member?
    That's just a guess, we established that we wouldn't use any special characters on our id's
    It's working so far
    Try changing the line
    *IS %DRIVSET%
    to
    *IS "%DRIVSET%"
    Edited by: Leandro Cardoso Feliciano on Mar 28, 2011 10:45 PM

  • What does Verizon charge for dry loop in NYC?

    Right now I have dsl with a land line. I want to drop the land line and go with dry loop. What does Verizon charge for dry loop in NYC?
    Thanks

    look at the 3rd column under No Verizon home phone on this link: http://www22.verizon.com/Residential/HighSpeedInte​rnet/Plans/Plans.htm

Maybe you are looking for

  • Multiple oracle home installation

    I am going to install oracle 11g2 on hpux server. The server already has 10g on it and the plan is to run both for sometimes. Unfortunately, IUnfortunately, I don't have prior experience installing multi-homed oracle software and I need help on how t

  • Problem With loosing connection with wired PC

    I have a model WRT54GS wireless router. My computer is wired into the back of the router. I loose the connection to the internet sometimes and when I check the connection status it says my computer is connected to another Router. Then it asks me if I

  • Form doesn't show -- HZ_CUST_ACCOUNT_ROLE_V2PUB.create_role_responsibility

    Hi All, Created Role responsibilities using HZ_CUST_ACCOUNT_ROLE_V2PUB.create_role_responsibility. API returned responsibility_id and I could check record in HZ_ROLE_RESPONSIBULITY table. But when I view it from Contact Roles screen, No value but If

  • Cursor flickering in IE 11 but not in Chrome...

    Hi, I wrote the question in IE 11 forum but they said I'm better writing here and they give me the link to post here. I have the following code where I have transition for an element that has the cursor as a hand.  In Chrome 40 it works just fine, th

  • Attaching Notes using GOS in background mode.

    Hi, I have a requirement where i have to attach notes to transaction WTYAUT through a abap program in background mode. Is there any FM/CLASS to do this?