Seite 1 von 1
Pattern based select function
Verfasst: 28. Juni 2019, 18:24
In some caches you get a value like an year number and use it for several variables like "xAxB".
The second number should be A, the last one B. Or "xAAx" where A should be composed from second and third letter.
Currently you can not prepare this because you have to enter the year value into the solver to be able to select the desired numbers/letters.
It would be nice to have a field to specify a pattern for selecting the parts of value.
Something like A = x$xx, B = xxx$, or A = x$$x
Re: Pattern based select function
Verfasst: 19. Januar 2020, 13:06
to push this topic a little bit:
you could intrdoce a new function "pattern()":
Variable YEAR (yes: four letters to distinguish it from the "normal" variables)
to automatically parse the value into variables. At the moment I manually create a variable YEAR and use formulas for A, B, C and D with wahl(import(YEAR)) and select the corresponding digit as a workaround for this missing - and often used - feature.
new feature pattern("ABBC") would result in
"Analyse" pattern and create corresponding variables just like analyzing formulas as usual!
"Parse" digits like in wahl()
use $ or - as a "not used" option, so that
would create A=1, B=9 and C=7
This could manually be done just like described above, so I think this would not be a big problem to implement, because Solver can do that already - a bit more complicated and manually, but even with two digits selection for a single variable. Downside of the manual method: I have to input a "dummy" year before I can select them in "wahl()" after importing them in A, B, C, and D. If no dummy is present I cannot check the boxes. With "pattern()" this would save a LOT of time.
Woraround at the moment:
After that I delete the value 1986 from YEAR to "reset" A, B and C to "nothing". The formulas then work as well when I enter the real year in the field.