First we have one VA01 script that creates a sales order. That is then linked to a VA02 script that uses the Add Long Text feature to add long texts. The VA02 script uses a transform formula to extract the sales order document number from the VA01 script. This is done with an Excel formula that looks at the VA01 log column to see if it contains the text "has been saved". If so, then the sales order number is extracted using a MID function.
When you run these two scripts in a chain, you can see that the formula does work but the second VA02 script will error out
Add the formula at long text level
In case of multiple long texts, we need to add the formula for each long text
Ex with MM02: