Set variable value to formula?

Hey

I think I need a way to set a Text Global’s value to be a formula.
I think, when I tap a button, it’s overwriting a formula with a fixed value.

Any help appreciated.

I have 3 sections of screen that show different content (Apps, Games, Music).
Each has a button with a touch action that both shows/hides it’s content, and also hides the other sections content.

I want the Music section to show automatically on a trigger from a Tasker value. That bit works, but for the first time only. When I tap a button it no longer responds to the Tasker variable.

Text Globals:
tMusic, returns a true/false string. $br(tasker, tMusic)$
vMusic, $if(tc(up, gv(tMusic))=“TRUE”, 1, 0)$
vApps, holds a 1/0 value. Default to 0
vGames, holds a 1/0 value. Default to 0

Touch action for “Apps” button, as example:
Toggle global switch, vApps, text: $if(gv(vApps)=1, 0, 1)$
Toggle global switch, vGames, text: 0
Toggle global switch, vMusic, text: 0

Hi there,

A quick tips for toggling between sections.

  • Use a single List global variable as the toggle index, rather than multiple number of Text variables.
  • The contents of each section cash be wrapped in an either Overlap Group or Stack Group.
  • The visibility of each section wrapper (Overlap Group or Stack Group) can be set to formula with the value checking the current List index.
  • Everytime the List index is changed, the respective section wrapper will be shown while the others will be hid.

I hope this would help.

Did you find the most helpful response to your issue?
Please kindly press the :check_box_with_check: Solution button to mark it as the solution.
This would help others with the similar issue.

:smiling_face::+1:

Thanks for the tip. I might try that on the next one.

For now I’ve got around my problem by using a Flow.