Using workflowContext.globals for global variables does not work for me

  1. My goal: to simulate the idea of global variables in a retool workflow. I want to be able to create a global "results" array that I can pass into a loop and have it push data into the array at every iteration.
  2. Issue: the suggested solution I read in a different article is not working for me
  3. Steps I've taken to troubleshoot: I already went to office hours, followed the instructions in the help article, and it is still not working
  4. Additional info: I followed the instructions in this article. Here is a screenshot of the issue:

Hi there @Sharon_Alexander,

First of all, I'm glad you asked this question as I was looking for a similar solution.

I noticed that when you click on the :arrow_forward: button when building the workflow you won't see the new property within workflowContext. However if you run your whole workflow it will actually come as a result in yoru resultsArray block, see screenshot below:

It is a bit annoying as it won't let you debug and build with that property available when writing code

1 Like

Got it, thank you Miguel!
However, for the retool team, it would be really great if you could get this working within a workflow because it's near impossible to test and debug complex workflows without being able to run specific blocks. Or offer some other solution to simulate the concept of global variables as they are a pretty essential feature.

1 Like