Automate

 View Only
  • 1.  Loop Command to Another Worksheet

    Posted 10-31-2019 14:53
    ​Hi!  Happy Halloween!  I've got a loop command on my WS script that works fine.  I would like to make the command transfer to another sheet, pick up the selection and then transfer back to the main tab.

    I'm getting all sorts of syntax lines, and won't therefore debug.

    What is supposed to happen is this:
    The request flows according to the script until it gets to the loop command. (Mirror Sheet)
    The loop command works on the Remove Roles sheet to check and remove any lines listed as a match.
    The command goes back to the Mirror Sheet and proceeds to completion.






    ------------------------------
    Eric Sandberg | Sr Financial Systems Analyst
    Walt Disney Company - Studio Entertainment | 818-544-9898
    ------------------------------


  • 2.  RE: Loop Command to Another Worksheet

    Employee
    Posted 11-05-2019 09:13
    Hi Eric

    Am not 100% sure I get your question.  Overall, there are two to map loops:
    1. loop everything on a single sheet
    2. loop with headers on one sheet and line items on another sheet.

    If I understand you correctly, you're trying to map some data one sheet (perhaps the non-looping?) and then looping on another sheet - or something like that in one script?  If so, you cannot span sheets in one script like that. 

    Your best best is to have individual scripts mapped and locked to their respective sheet and then chain them together, so that one RUN click will run all of them.    You can also refer to data on another sheet using a sheet reference  mysheet!B2, for example, to pull everything into one sheet.

    Hope that helps.

    Best Regards
    Sigrid

    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------



  • 3.  RE: Loop Command to Another Worksheet

    Posted 11-05-2019 15:47
    Thanks Sigrid!  Maybe chained scripts would work for this.  What I figure, is the delete role area would be better on another sheet, since each line is a new SAP position ​modify command line.  That way if I want to mirror a SAP position roles to another SAP position roles, and the mirroring position has many prospective roles to not add, the loop can ensure non warranted roles are not added.



    ------------------------------
    Eric Sandberg | Sr Financial Systems Analyst
    Walt Disney Company - Studio Entertainment | 818-544-9898
    ------------------------------



  • 4.  RE: Loop Command to Another Worksheet

    Employee
    Posted 11-05-2019 16:30
    Yes, Eric, that's correct.  That's what I would do, anyway.  :)

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------



  • 5.  RE: Loop Command to Another Worksheet

    Posted 11-05-2019 17:14
    Where would the reference to another data sheet go in the script?



    ------------------------------
    Eric Sandberg | Sr Financial Systems Analyst
    Walt Disney Company - Studio Entertainment | 818-544-9898
    ------------------------------



  • 6.  RE: Loop Command to Another Worksheet

    Employee
    Posted 11-06-2019 08:54
    Hi Eric

    You would refer to other sheet cell values in excel, like =mysheetname!A1 pulls in the value on sheet:  mysheetname in cell A1.   Once the data is pulled into one sheet, you can use it in your loop or IF or upload.

    Also I suggested locking scripts to their respective sheets.  That is done on the RUN tab of Studio - choose the sheet and then click the lock button

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------



  • 7.  RE: Loop Command to Another Worksheet

    Posted 11-11-2019 14:46
      |   view attached
    ​I'm getting it, but there are so many options on where to put the formula in the sheet.

    I wish there were better screenshots for help on loops on this document:  docs.winshuttle.com/...

    I've kept the sheet headers the same.

    It seems there is an easy fix!  Thanks and happy Monday!

    ------------------------------
    Eric Sandberg | Sr Financial Systems Analyst
    Walt Disney Company - Studio Entertainment | 818-544-9898
    ------------------------------

    Attachment(s)

    docx
    Multiple Sheet Loop.docx   301 KB 1 version