Automate

 View Only
  • 1.  Loop Command to Another Worksheet

    Posted 12-02-2021 14:44
    Hello, how can I specify the loop identifier that is on another workbook sheet?
    This is the scenario I want to perform. 
    1. SAP follows the script, and per the steps, it copies the assigned job roles to the new HR position( this is a built SAP command). 
    2. Then, my script looks over the SAP roles copied over, goes through a loop to identify specific roles and removes them.
    3. When all special identified roles are removed from SAP screen, script directs SAP to end commands.
    SAP transaction opens
    Header in SAP transaction is filled in
    Mirror function is enacted
    Loop identifier removes specific items that were populated in mirror function.
       Mirror function brings over roles:  A,B, D, F, G, H.  Loop identifies roles D and H, and removes them before proceeding.

    Note, this script already contains 1,507 steps in it.  It errors out WinShuttle Studio if I am not gently editing the script.

    My Template for this script
    Thanks!


    ------------------------------
    Eric Sandberg | Sr Systems Analyst
    Walt Disney Company - Studio Entertainment | 1-818-429-7490
    ------------------------------


  • 2.  RE: Loop Command to Another Worksheet

    Employee
    Posted 12-08-2021 09:55
    Hi Eric

    The doc on multi-page looping is here:  https://docs.winshuttle.com/studio-en-20-2-online-help-studio-with-connect/Advanced-looping.htm?tocpath=Studio%2020.2%20Online%20Help%7CTransaction%7CMap%20Fields%7CLooping%7C_____4

    There's also some info on looping in the Studio online training here:  https://customers.elearning.winshuttle.com/learner/courseinfo/id:138

    If you're trying to loop to delete something, you'll need to add the delete portion of the script to find and delete a row *inside* of the loop.  From what I'm seeing, you only have an OK code inside, which what looks like a DELETE command *outside* of the loop.

    Another tip would be to create separate scripts for each function, i.e. Add or Delete.  It would make things much more manageable to both create & maintain scripts.  You can always chain them together so that they run closely together.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------