You have two options (that I can think of off the top of my head, there may be others). See this topic:
The main idea of that topic would certainly cover this use case; so, that’s one option. However, down at the end of the post, there’s a concluding paragraph on possible combinations of actions and it mentions that if you want multiple variables, you can just use a single object with multiple keys as the variable.
Please could you explain how it works? I am still not clear how this would work if I need to set for example two variables Variable1 and Variable2 to false?
The issues you are having with both versions is because of the false value that you are trying to set. It is a quirk of the way the yaml system works, that false values are equivalent to no value when converted to json for processing. The example that @hmerk showed works because that false value is not a boolean false, but a string 'false'. (The same problem actually arises with 0 sometimes in widgets because that is also a falsy value.)
In practice, setting a variable to false is no different than clearing the variable. So, it turns out, if the only time you are setting multiple variables is to set them all to false, then you don’t need any special widget constructions, just use the clear variable function which can, as you have noted, take a list of variable names.
The most reliable way to get around this issue if there’s some reason in your widget why an actual false value must be different than undefined is to work with strings such as 'true' and 'false' or something even more descriptive such as 'active' and 'inactive'. This complicates widget expressions a little because you have to actually test the variable value instead of just using the variable as a boolean directly (e.g., (vars.dummy == 'active') instead of just vars.dummy). The good news is with the now oh-context you can create a test function that is even easier to read (e.g., fn.isActive(vars.dummy))
I am actually not using the results in an expression at this stage. I am displaying/logging them out to see what happens as I am trying to find the easiest way to visibility of some components to only be true when the component is active (you helped me with part of this some time ago).
Because I am logging them out I am pretty confident they are not actually being set to false (or undef). I have tested again without using false just to be 100% sure:
That being said I have a working option using @hmerk option after I realised that I had to use vars.objVar.Variable1 syntax.
Just trying to work out whether that solution or your initial solution with the nested oh-button is better? I have not been able to get the nested button to work as I mentioned in Point 7 above?
It seems that the problem is that you have both the components as oh-buttons. The second, nested, component must be an oh-link. The top one can be a button if you prefer.
I’m not 100% sure why it makes a difference whether the nested component is a link or a button, I can only guess that there’s something to do with the way the underlying f7 library handles the two.