Functions: Increment Variable
Sharat Hegde
It should be a single function which gets the value of a variable, increments it and sets the value.
Additionally, it should be possible to add any numeric value to the variable. So one should be able to add 2 to a variable within a loop.
This is a common operation within large processing scenarios and lots of extra operations are required to get the value, and set the value to 1 more than the previous value.
Log In
Autopilot
Merged in a post:
Add Increment function to general functions
Jeremías
Add Increment function to general math functions (as "+", "sum", "random", etc) so it's not needed to have a separate module.
Autopilot
Merged in a post:
updating a data store value with relation to the previous value
Rafi Newman
hi
i was looking for a way to update a data store value with relation to the previous value in a single operation but did not find any way to do it without using 2 modules , one for reading and one for updating.
i can give 2 examples:
1) i keep a counter in a stored value and i would like to increment it by 1
2) i keep a value in a stored value and i would like to update it only if my new value is larger (or smaller)
so i suggest yo add a new reserved keyword or new function to represent the existing value so users can update the value with a single module and an expression like this:
new value == {{self}} + 1
or
new value == max({{self}}; <new value>)
you may call it Self or This
same idea for "Set variable" module
thanks
Photo Viewer
View photos in a modal