I have a very simple desktop flow that runs a for loop and prints out a variable that I increment in the loop. When I run the flow on the desktop, it works perfectly printing out:
11/25/2022 5:06:24 PM: Start
11/25/2022 5:06:24 PM: Looping counter = 0
11/25/2022 5:06:24 PM: Looping counter = 1
11/25/2022 5:06:25 PM: Looping counter = 2
11/25/2022 5:06:25 PM: Looping counter = 3
11/25/2022 5:06:25 PM: Looping counter = 4
11/25/2022 5:06:25 PM: End Counter = 5
But if I run the exact same flow from a cloud flow, it prints out:
11/25/2022 5:08:44 PM: Start
11/25/2022 5:08:44 PM: Looping counter = 0
11/25/2022 5:08:44 PM: Looping counter = 0
11/25/2022 5:08:44 PM: Looping counter = 0
11/25/2022 5:08:44 PM: Looping counter = 0
11/25/2022 5:08:44 PM: Looping counter = 0
11/25/2022 5:08:44 PM: End Counter = 0
This is my script:
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
SET Counter TO 0
File.WriteText File: $'''C:\\Access\\LogFile.txt''' TextToWrite: $'''%CurrentDateTime%: Start''' AppendNewLine: True IfFileExists: File.IfFileExists.Append Encoding: File.FileEncoding.Unicode
LOOP LoopIndex FROM 1 TO 10 STEP 1
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
File.WriteText File: $'''C:\\Access\\LogFile.txt''' TextToWrite: $'''%CurrentDateTime%: Looping counter = %Counter%''' AppendNewLine: True IfFileExists: File.IfFileExists.Append Encoding: File.FileEncoding.Unicode
Variables.IncreaseVariable Value: Counter IncrementValue: 1
END
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
File.WriteText File: $'''C:\\Access\\LogFile.txt''' TextToWrite: $'''%CurrentDateTime%: End Counter = %Counter%''' AppendNewLine: True IfFileExists: File.IfFileExists.Append Encoding: File.FileEncoding.Unicode
Would appreciate some help.
TIA
Heinrich