How to exit Loop in the middle

I have a requirement of exiting a loop in between, if a particular condition is satisfied. How do i achieve this in workflow? I thought of using 'Process Control' but it has no option to exit a loop from the middle....is there a way out?

Hi,
Loop runs until a condition is met.
So to exit a loop you need to set a condition as false at a step and then it would exit.
To do so, you can set a flag value in the loop processing. When ever the flag is initial keep on processing the loop and when you want the loop to exit, just set the value of the flag.
Hope this helps!
Regards,
Saumya

Similar Messages

  • Multi-record block (how do I loop through the block)

    I created a two canvas form. On the first canvas, the user enters data and selects 1 - 30
    reports that they want to run. When they click on <NEXT> button, I create a multi-record
    control block and display each record on the second screen using
    go_block;
    clear_block;
    move data;
    create_record;
    The user then selects on the second canvas which reports to run now and which to run later via
    a LOV. When they press the <RUN> button, I want to start at the first record and either run the
    report or schedule it. Then I want to move onto the second and the third until all selected reports
    have been handled. I know I should use a loop but can't seem to make it work.
    So my question is, How do I loop through the records in a multi-record control block, pass the information
    for that one record to a parameter form and then execute the request? Each control block record contains
    10 parameter fields.
    Thanks.
    Bob

    go_record(1);
    << do your processing >> -- This is executed only for the first record.
    if :system.last_record = 'TRUE' then -- If the 1st record is also the last record.
    RETURN;
    end if;
    LOOP
    next_record;
    << do your processing >>
    if :system.last_record = 'TRUE' then
    EXIT;
    end if;
    END LOOP;
    I created a two canvas form. On the first canvas, the user enters data and selects 1 - 30
    reports that they want to run. When they click on <NEXT> button, I create a multi-record
    control block and display each record on the second screen using
    go_block;
    clear_block;
    move data;
    create_record;
    The user then selects on the second canvas which reports to run now and which to run later via
    a LOV. When they press the <RUN> button, I want to start at the first record and either run the
    report or schedule it. Then I want to move onto the second and the third until all selected reports
    have been handled. I know I should use a loop but can't seem to make it work.
    So my question is, How do I loop through the records in a multi-record control block, pass the information
    for that one record to a parameter form and then execute the request? Each control block record contains
    10 parameter fields.
    Thanks.
    Bob

  • How to insert text in the middle of an existing textfile using java

    Hi,
    How to insert text in the middle of an existing textfile using java i/o streams??

    Mickie wrote:
    I shudn't delete the file...Then you will have the old file and the new file - do you want that?
    and I have to insert text not only at a single place ....got to do at many places in the text file!!then extrapolate on the procedure outlined in reply #1 .

  • How can I stop a timed loop in the middle of its cycle?

    Hello all,
    I'm creating VI that will gather data from a series of thermocouples and outputing that data to a graph as well as to a spreadsheet file.
    The sampling rate for each channel needs to be independent and variable. That is, they want to increase the sampling rate to 1/sec during temperature transitions, and then 1/10minutes (for example) when saturated.
    I was going to use a menu ring for the user to select the sampling rate (1 second to 15 minutes, with 7 different rates in between) and then, using a case statement, select the value of how long the 'wait (ms)' should wait in each loop.
    This kind of works with one major problem. If the user currently has the sampling rate set to 15 minutes, th
    en wants to switch it to 1 second, it can take up to 14:59 for the 'wait(ms)' to finish waiting on the 15 minute wait before it switches to the faster sampling rate.
    Is there a way to stop a 'wait(ms)' in the middle of its wait cycle? Or is there a better way of doing this?
    Thanks in advance for your help.
    Dave Neumann
    [email protected]

    "Neumannium" wrote in message
    news:[email protected]..
    > Hello all,
    >
    > I'm creating VI that will gather data from a series of thermocouples
    > and outputing that data to a graph as well as to a spreadsheet file.
    >
    > The sampling rate for each channel needs to be independent and
    > variable. That is, they want to increase the sampling rate to 1/sec
    > during temperature transitions, and then 1/10minutes (for example)
    > when saturated.
    >
    > I was going to use a menu ring for the user to select the sampling
    > rate (1 second to 15 minutes, with 7 different rates in between) and
    > then, using a case statement, select the value of how long the 'wait
    > (ms)' should wait in each loop.
    >
    > This kind of works with one maj
    or problem. If the user currently has
    > the sampling rate set to 15 minutes, then wants to switch it to 1
    > second, it can take up to 14:59 for the 'wait(ms)' to finish waiting
    > on the 15 minute wait before it switches to the faster sampling rate.
    >
    > Is there a way to stop a 'wait(ms)' in the middle of its wait cycle?
    > Or is there a better way of doing this?
    Instead of using the wait ms.vi you could use 'tick count' at the beginning
    of the loop and then have an inner loop that keeps checking the 'tick count'
    until time minus time > time to wait.
    You will need to figure out how to handle the case where the millisecond
    timer wraps from 2^32-1 to zero. That should not be too difficult.

  • How do I change what the middle mouse button/wheel does?

    I feel like an idiot asking this, but I can't figure this out...
    I've plugged in a bog standard 2 button + scroll wheel third button mouse, but I can't get the middle mouse button/wheel to behave like it would in Windows.  If I click it, it changes programs, hold it it brings up the task switcher thing.  It's like I'm pressing command + tab.
    I want it to work normally, where the program I'm using the middle button responds, not the OS.  Like in Firefox, I want to be able to close tabs with the middle mouse button, and open new links with it...instead all it can do is switch programs.
    Is there a way to do this?  Am I missing something obvious?

    Err...I don't know what happened, but I rebooted and now it's working like normal (knock on wood!).  Noooo idea how it ended up in that state!

  • How do I edit out the middle of a video clip?

    I am used to shortening a movie clip on either end, but don't know how to cut out a portion in the middle. Please help me. Thank you.

    Hello Miriam Griggs
    There are a few ways you can do that. Check out the  page below and it will layout the multiple ways to trim clips, even the stuff in the middle.
    Trim, split, and move clips
    http://help.apple.com/imovie/mac/10.0/#movf8b8fc9b2
    Regards,
    -Norm G.

  • Quick Q, How to allocate app on the middle of desktop?

    Hi all,
    I was in Apple store and found out all the macs have some application on the middle of their desktops such as Safari, ITunes...They are in a ellipsoid thing...
    My description isn't very clear but I guess you'd know what I am talking about if you've seen it or you know how to do it.
    So...can anyone teach me how to do it? Thank you very much!

    Switching between applications

  • How can I remove only the middle elements from a 2-D array?

    Hello all!
    We have had an issue at my work where some of our graphs featuring a Gaussian curve have an unusual rectangular distortion in the middle of the curve (sorry that I have no image to show you, the error is before my time at the company, and I've been asked to find a solution before it happens again). Basically, what should be a Gaussian curve is leveling off briefly and looking like a rounded square wave. We know what causes the distortion, so I only wish to remove the middle part, giving it the appearance of a Gaussian. It's odd, but it actually offers a good approximation of what we want. The graph is made from a 2-D array of Double values, and we can estimate the size of the leveled-area, so I figured that removing the middle elements from the graph would accomplish this. Does anybody know a way I can accomplish this?
    -Gobble
    LabView 8.5.1

    Raven,
    Thank you very much, I'll try that!
    -Gobble
    LabView 8.5.1

  • How to insert row in the middle of a table so that the below content will move to another page?

    I'm making a huge form in LiveCycle Designer. I want to be able to add rows in the middle o the table but in a way that the content below will move down automatically in a way it doe's in Word for example.
    Sometimes I am adding a very high new row in the middle of a page and I want the content in the below rows to be moved to another page and if it is necessary I want a new page to be automatically created on the bottom of a document or something.
    Is this possible or do I have to move everything by hand if I add new row to a table?

    If you are adding the rows at the runtime by clicking a button, then you have to use the instance Manager to add rows.. It will add rows at the end and then you need to write code to move the row at the desired location by using the moveInstance method of the instanceManager.
    If you are adding a row at the design time, then you can right clcik the row and choose to add rows below.
    Thanks
    Srini

  • How can I edit in the middle of the video for FLV component

    I have a video which my client wants me to cut in pieces. I see that I can set up starting and ending points in Media Encoder, i.e. cut out the part from beginning and end. Is there an option to cut out parts in the middle?
    I am familiar with After Effects but my client doesn't want to invest in this program. Are there any smaller/cheaper programs which allow more video editing that AME if AME indeed can not do it?
    Is there any other way to go about it?

    Remember that an flv file is an already compressed video file, so you do not want to re-render (run the compression process) again unless you really know what you are doing..... the quality will only degrade.
    Here is a FREE little utility that I use if I have to join several flvs together or slice one up into section. It does this all without re-rendering!
    http://download.cnet.com/Moyea-FLV-Editor-Lite/3000-2168_4-10912717.html
    But because it's free, you are not getting a full fledged digital video editing program, but it works GREAT for the limited job of joining multiple flvs or slicing up a single into multiple section... then saving each section as a separate file.
    Best wishes,
    Adninjastrator

  • How to let content in the middle of the browser?

    I want the content in the middle of the browser. I change the align property of the root af:document and af:form. It doesn't work.
    Thanks.

    Perhaps there's something here that might help?
    Sizing and positioning of an af:decorativeBox

  • JDev 10.1.3.4: How to properly loop through the rows of a VO?

    Hi,
    This is a newbie question. Using JDeveloper 10.1.3.4 I am trying to loop through the rows of a view object. I am sure that the VO returns the following rows in that order:
    200809
    200902
    200906If I use this code (where termsOpen is the VO instance):
    while (termsOpen.hasNext()) {
       System.out.println(termsOpen.getCurrentRow().getAttribute("Term"));
    }it proves to be an endless loop and I get "200809" printed on the console endlessly. The API says that hasNext() "does not move the current row". A book says that the pointer initially is at row 0. I wonder why it prints the first row. So the code is changed to:
    while (termsOpen.hasNext()) {
       Row currRow = termsOpen.next();
       System.out.println(currRow.getAttribute("Term"));
    }But now I get only the last two rows printed on the console, and do not get to see the first row:
    200902
    200906What's wrong?
    Thanks for helping!
    Newman

    Hi, Branislav,
    Thank you for the suggestion.
    I tried that also. When the code is
    while (termsOpen.hasNext()) {
       System.out.println(termsOpen.getCurrentRow().getAttribute("Term"));
       termsOpen.next();
    }I get only the first two rows and last row is dropped:
    200809
    200902To get all the three row, I end up using this code:
    System.out.println(termsOpen.first().getAttribute("Term"));
    while (termsOpen.hasNext()) {
       Row currRow = termsOpen.next();
       System.out.println(currRow.getAttribute("Term"));
    }But that shouldn't be the way of doing the work. If I use a block of 50 lines of code to process each row, the code will have to be written once before the while loop and another time inside the while loop.
    The book which says that the pointer starts at the row slot before the first row is found on the internet, on p.469. It makes sense to me that the pointer starts at row 0. But unfortunately the actual copy of JDev 10.1.3.4 I am using behaves otherwise.
    Newman

  • How to give loop to the template

    hello,
    i had created smartform, in that i had created the template. Now the driver program had passing two records. But the template at a time will process the one record. So can we please specify how to loop into internal table which is coming into smartform from driver program. I had check in the driver program the internal table conatins two record but at the time of execution ie after passing to smartform it is taking latest record ie second record.

    HI,
    Let me say the clear picture..
    Let us take the table below
    Fields:
    matnr werks lgort   -
    This is the template static value
    1001   09    1001         -
    This is an internal table
    1003   09    1001     
    Template just takes static values you cannot loop into it..
    please define a table by right click and pass the values.
    rewards if useful,
    regards,
    nazeer

  • How do I mask out the middle of an Object?

    Hello everyone...
    I am using CS4...
    I have a circular object that I need to mask out the center of it too...
    I know how to do the masking of the outter part of the onject just cant figure out how to knock-out the center!
    Please help!
    Thanks in advance!

    yes like the earlier guys said......lets say you have a picture and you want to make the outer edge masked to a circle and you also want to make a portion in the center be knocked out. Take the outer circle where you want it and make the inner circle where you want that one. Select both of the circle and make it a compound path. Then put your compound path on top of your image and select both of them and make it a clipping mask. It acts screwy sometimes so try it a couple times and it should eventually work!

  • How can i loop over treeview selected nodes and then to delete each node if it's a directory or a file ?

    I have this code:
    if (s == "file")
    file = false;
    for (int i = 0; i < treeViewMS1.SelectedNodes.Count; i++)
    DeleteFile(treeViewMS1.SelectedNode.FullPath, file);
    I know it's a file and it is working if it's a single file.
    On the treeView i click on a file right click in the menu i select delete and it's doing the line:
    DeleteFile(treeViewMS1.SelectedNode.FullPath, file);
    And it's working no problems.
    But i want to do that if i selected some files togeather multiple selection then to delete each file.
    So i added the FOR loop but then how do i delete from the SelectedNodes each node ?
    The treeView SelectedNodes dosen't have FullPath like SelectedNode also doing SelectedNodes[i] dosen't have the FullPath property.
    Same as for if i want to delete a single directory or multiple selected directories:
    This is the continue of the code if it"s not a "file" (else) it's null i know it's a directory and doing:
    else
    file = true;
    RemoveDirectoriesRecursive(treeViewMS1.SelectedNode, treeViewMS1.SelectedNode.FullPath);
    Also here i'm using SelectedNode but if i marked multiple directories then i how do i loop over the SelectedNodes and send each SelectedNode to the RemoveDirectoriesRecrusive method ?
    My problem is how to loop over SelectedNode(multiple selection of files/directories) and send each selected file/directory to it's method like i'm doing now ?

    foreach (TreeNode n in treeViewMS1.SelectedNodes)
    // Remove everything associated with TreeNode n here
    I don't think it's any harder than that, is it?
    If you can multi-select both an item and one of its descendents in the tree, then you'll have the situation that you may have deleted the parent folder and all of its children by the time you get around to deleting the descendent.  But that's not such
    a big deal.  A file can get deleted externally to your program too - so you'll just have to deal with it having been deleted already (or externally) when you get around to deleting it yourself.

Maybe you are looking for

  • How Can i De-authorize computers from my itunes account

    as people may know it is only possible to have 5 computers authorized to play itunes music however how can i de-authorize computers i don't have anymore, or computers that been restored back to factory settings. as i have 4 registered but only have o

  • Embedded flash player is not working... Unable to play the streaming videos... Browser is hanging many times!!

    Hi, Pls help me to fix an issue with my playbook browser. The embedded flash player is not working... Unable to play the streaming videos... Browser is hanging many times. Restart done, cleared history etc.. Still doesn't work. Any help would be appr

  • How to change the package for a report

    Hi can any body tell me the steps to change the package name of a report? thanks in advance kp

  • Flattening of xml

    Hey, I have an xml document that is an atom feed. As atom feeds go the repeating element is the <entry> I'm trying to access the <contributor><name>text</name></contributor> Is there any "work around" usings Spry's API to access this?

  • Translation to Language

    Hello Friends, My corrent project need me to change certain SAP Transaction Screen Translation like VA01. I have created a New Language . I am doing the change in SE63 through DTEL ( Data Element ) Short Text. I have done it for TXT_AUART I have Save