I declared a gv as number (0 to 2) and I want to set its value to “1” by tapping an icon. How do I gain to open the formula field?
You should be able to achieve this using Flows with a manual trigger and a “Set Global Var” action.
Thanks for your advice, but I seem to have some kind of knot in my brain…
When trying to set a gv I can’t select any value.
I also tried to edit a formula as
“$ gv(count) + 1$” or
“$gv(count) = gv(count) +1$”
When tipping the action button, tha app tells me “flow chrtbrnft” but my flow is called “fl1” and nothing happens
In “touch action” I don’t find a possibility to edit a formula
For I’m as sayed a bloody beginner, there is really not much code in my script…
What is my problem, and how to solve it.
In the tutorials I can’t find, what I’m searching for…
Counterintuitively, you should use a text global instead of a number global. When you use Touch Action > Toggle Global Switch, the text global will show up on the list you can pick from, and when you pick a text global, an additional field will appear allowing you to write a formula the result of will be written to the text global.
- Add a text global named
count
. If you give it the same name, it will simply replace your existing number global. Write the value you want to start at in the global. - Go to the object you want to add the touch action to. Add a touch action > toggle global switch > select your text global, then in the field that appears enter your formula:
$gv(count) + 1$
This will make the count increment each time the touch action is triggered.
thetored you’re great!
You found that knot in my brain, I never thought of using a text var for counting a number
So, all is fine here, I’ll continue my project.
Thx a lot
Yeah it’s a bit counter-intuitive that you can’t write to any type of global other than text globals, and also that you have to “toggle global switch” to write to text globals, but well. Glad it works!