Best way to temporarily store results?
Posted: 08 Mar 2013 09:07
I am looking for ways to store results for conditionals that can be queried by conditionals later flows.
For example, I have a typical flow that enables and disables airplane mode at certain times. But there situations where I don't want this to happen. For instance, when I am on an airplane...
So, my idea was to add a conditional to the "disable airplane mode"-flow that checks whether the phone is in airplane mode, either because of manual user invention, or because previously the "enable airplane mode"-flow was executed.
If it was due to manual user invention (i.e. me clicking on airplane mode before the plane takes off), then I want a conditional in the "disable airplane mode" to detect this and stop the flow (without disabling airplane mode).
So in practical terms, I would enable a conditional in the "enable airplane mode"-flow to see if the phone is already in airplane mode. If it is not, I would __somewhere__ save a boolean in a variable before continuing the flow. Later then in the "disable airplane mode" I could check if this boolean was set. If it wasn't, the flow would know that the airplane mode was triggered manually and hence it wouldn't continue to disable airplane mode.
So, one way I thought this might be possible is to save the boolean status in an external file through Automagic and then later read that file again. Is that how it works? What would be nicer, and more efficient, but I think doesn't exist right now, would be an option to set and get variables that would then be stored in the local SQL database of Automagic.
For example, I have a typical flow that enables and disables airplane mode at certain times. But there situations where I don't want this to happen. For instance, when I am on an airplane...
So, my idea was to add a conditional to the "disable airplane mode"-flow that checks whether the phone is in airplane mode, either because of manual user invention, or because previously the "enable airplane mode"-flow was executed.
If it was due to manual user invention (i.e. me clicking on airplane mode before the plane takes off), then I want a conditional in the "disable airplane mode" to detect this and stop the flow (without disabling airplane mode).
So in practical terms, I would enable a conditional in the "enable airplane mode"-flow to see if the phone is already in airplane mode. If it is not, I would __somewhere__ save a boolean in a variable before continuing the flow. Later then in the "disable airplane mode" I could check if this boolean was set. If it wasn't, the flow would know that the airplane mode was triggered manually and hence it wouldn't continue to disable airplane mode.
So, one way I thought this might be possible is to save the boolean status in an external file through Automagic and then later read that file again. Is that how it works? What would be nicer, and more efficient, but I think doesn't exist right now, would be an option to set and get variables that would then be stored in the local SQL database of Automagic.