Hi Vicky -
Essentially you'd need to use a combination of excel formatting and an IF statement around the entire script that you would like run / not run. Whatever is the indicator of "success" for the leading script, such as a log column having a certain statement, would be used to drive the IF statement. If you are using separate tabs in your Excel, you would want to make sure that the tab that the affected script is pointing to includes the log column from the leading script, you would use formulas to point to the leading script's tab. That log column (or whatever column would be used for the IF condition) would then be used as the condition for the IF statement that would be placed on the entire affected script. This means that in the Expert view of the mapper, the IF condition would start from the first row after the run log fields, and go all the way to the very end of the script. So this tells the script to run the whole thing or to not run the whole thing based on the condition.
Thank you!
------------------------------
Jennifer Hwang | SE
Winshuttle North America
------------------------------
Original Message:
Sent: 06-28-2021 17:38
From: Vicky Muresan
Subject: Link/Chain Transaction Scripts in Studio V12.1 - How to prevent execution of remaining Scripts in the Chain if One script Fails?
Hello - this is my first attempt to chain scripts in Studio Connect V12.1 on New Material Set up. How can I prevent the execution of remaining scripts in the Chain if One of the scripts Fails.
To be more specific, here it is the desired linking:
| Chain | Chain Name | Script Names | Comments |
| Chain 1 | MDT CHAIN1 | MDT STP1 MM03 NEWMAT BASIC12 DOWNLOAD V2.Txr | |
| Chain 1 | MDT CHAIN1 | MDT STP2 MM01_SALESORG1 TO COSTING2 DISTCH10 VAL PLAIN V2ch.Txr | If an error occurs here (because the Ref Mat is not set up properly), how do I stop running remainign scripts in the chain? |
| Chain 1 | MDT CHAIN1 | MDT STP3 MM01_SALESORG1 TO SALESTXT DISTCH20 V2ch.Txr | |
| Chain 1 | MDT CHAIN1 | MDT STP4 MM01_ACCTG 12 VALTYPE EXT V2ch.Txr | |
| Chain 1 | MDT CHAIN1 | MDT STP4A MM01_ACCTG 12 VALTYPE INT V2ch.Txr | |
| Chain 1 | MDT CHAIN1 | MDT STP5 MM02 DOWNLOAD NEW MAT V2ch.Txr | |
| | MDT STP6 MM02 UPDATE NEW MAT V2ch.Txr | User makes proper updates to the same sheet as Downloaded data |
| Chain 2 | MDT CHAIN2 | MDT STP7 MMSC EXTEND STORAGE LOC V2ch.Txr | |
| Chain 2 | MDT CHAIN2 | MDT STP8 SCWM CREATE WH DATA for EWM Plant V2ch.Txr | |
| Chain 2 | MDT CHAIN2 | MDT STP9 MM02 ACTIVATE MAT DISTCH10_20 V2ch.Txr | |
Thank you!
------------------------------
Vicky Muresan | Master Data
Synergy55 | 847-687-7413
------------------------------