Set variable / Set multiple variables - Variable lifetime

Hi all,
So, this question is probably the result of my somewhat poor understanding of the English language.
To make is simple: how does a “cycle” relate to iterator?
https://www.make.com/en/help/tools/tools#set-multiple-variables

Staying simple, let’s zoom into two modoules from a larger scenario:
image

Dummy setup for the Set multiple variables:

Coming back to my original question:
Will these variable “reset” for each iteration?
What will happen when one of these variables is empty during one iteration? It seems that variable will not get reset to empty and it will retain the last set value. For example:
During iteration one we set var1 to “XX”
During iteration two we don’t set var1. So I would expect it to be “set” to empty string. Instead, as far as I can tell, it still has the value “XX”.
During iteration three we again don’t set var1 and again it retains the value “XX”.
During iteration four we set var1 to “YY” and this indeed overwrites “XX”.

The setting for the lifetime is talking about “one cycle”, which I assumed can be interpreted as “one iteration”. i.e. - when each iteration is over, the variables are “lost”.

What am I missing?
Thanks

See here how it works

Watch: Loom | Free Screen & Video Recording Software | Loom

1 Like

Hi @Growwstacks.com ,
Many thanks for this video.
Your logic is indeed correct but I fear that I haven’t explained myself correctly. The real issue is what happens when one (or more) of the iterations has NO value.
See here
As you can see, during the 2nd iteration the value for “var1” isn’t changed, yet it is fetched as per its value during 1st iteration. Same output will happen if you have 1000 iterations, and just 200 of them have values for var1. It’ll keep on outputting the “last known” var1.
This means lifetime is basically “until further notice”, and not just one cycle/iteration.
Am I missing something?
Thanks

I saw your video, and I could sense what you are trying to achieve. I think instead of using the Basic Trigger to store variable values you should use the Incremental module.

Also, both the filters are working fine but seems there is a mapping issue in the second route.

I am not using the Basic trigger in my live scenario. It’s just for this example. The lifetime issue happens regardless of which modules come before the “Get” (single or multiple) module.
Could you please explain what am I missing regarding iteration two in my video? Why didn’t var1 return as “empty” for this iteration?

Are you referring to the fact that I forgot var2?
It’s not very important. I just wanted it as a reference point, but turned out I don’t need it.

Thanks for the kind offer, but I’m not sure I understand why we need to connect.
If we bottom line it, the question is rather simple:
When working with iterators, let’s assume there are two modules
a. Set variable (lifetime: one cycle)
b. Get variable
Module a (Set variable) is triggered based on filter. Filter creates a situation where this module isn’t always triggered, i.e. variable isn’t set for all iterations.
Module b (Get variable) is always triggered.

And the bottom line:
For iterations in which module a wasn’t triggered, what should be the output of module b?
My understanding was that output should be empty. My previous post presents a video in which the output was NOT empty.

Thanks