Yeah updating the variable worked when I tried this months ago so I'm guessing there's been some change in behavior. Can't use lindy context/memory as I'm trying to use a "manual" prompt which I don't believe I can pull from memory for unless I'm mistaken. Agree sheets is doable but is messy - I'd have to continually read and update. Doable, but externalizing simple variable management to a google sheet or database seems like it's inelegant for something that can best be done in-platform. I'm considering using a traditional loop and limiting concurrency to 1 which would still result in excessive updates and calls to sheets, but brings everything into Lindy's default loop behavior versus leveraging conditions. Easier to manage.
https://chat.lindy.ai/jeffrey-thompsons-workspace/lindy/24-recurse-loop-6867d698f088de99157a157c/editor - I haven't configured the condition fork because I can't seem to figure out how to update a variable that doesn't seem to declare a new one. The intent is to update the Count and Exclude variables and return to the Perplexity prompt that refers to their initial values (as a variable).
Is there an effective way to update variables once set? For example:
In the beginning of a flow, set a variable "myvariable" as a whole number - such as 10
prompt ai command - perform a basic task, set to search for up to three people at a time, up to a maximum of the "myvariable" count
decrease variable "myveriable" by the number of people returned
reach condition:
Condition A: If variable is >0, return to 2
Condition B: If variable is 0, print message and complete flow/exit
If, for example, the myvariable was initially set to 10, and each search successfully returned up to 3 people, it would cycle 4 times. Cycle 1: Return 3 people, reduce variable to 7 Cycle 2: Return 3 people, reduce variable to 4 Cycle 3: Return 3 people, reduce variable to 1 Cycle 4: Return 1 person, reduce variable to 0, reach condition loop completion criteria I swear I used to be able to do this by setting a variable again with the same name, however it seems to then create a new variable, hence I can't continually refer to a variable that should be updated in-place. I'm thinking of using memory instead, but I'm guessing somehow I'm misusing variable because it's supposed to be able to ... vary. This isn't the only thing I need to update on the fly - other variables would be lists of names, etc. I can commit and read these from a google sheet as an option but as lists grow I believe this may become "expensive" - whether model costs or context management in general.
