Be sure to review our Idea Submission Guidelines for more information!
It would be useful to allow for temporary local variables in formula tools. This could make code shorter, better readable, easier to maintain and help to avoid auxiliary columns which have to be deleted afterwards.
Arbitrary example for illustration:
if Length([Col1] + [Col2] + [Col5]) > 50 then
Left([Col1] + [Col2] + [Col5], 48) + "..."
[Col1] + [Col2] + [Col5]
tmpstr = [Col1] + [Col2] + [Col5]
if Length(tmpstr) > 50 then
Left(tmpstr, 48) + "..."
The idea is that the temporary variable has limited validity inside the formula for a specific cell.
@haraldharders Really interesting idea. @jdunkerley79 's alteryx abacus would allow something similar to what you're after. It would be great if they could build something like this into the product itself without having to use a third party addin.
if Length(VarTextWrite("tmpstr",[Col1] + [Col2] + [Col5])) > 50 then
Left(VarTextRead("tmpstr"), 48) + "..."
hi @haraldharders, thanks for your idea! I have definitely found myself wanting the same thing at times. We’re doing our best to ensure all product ideas are reviewed and commented on by Alteryx when the necessary criteria are met. Be sure to check out our updated Submission Guidelines for any board or criteria related questions!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.