Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!
The Product Idea boards have gotten an update to better integrate them within our Product team's idea cycle! However this update does have a few unique behaviors, if you have any questions about them check out our FAQ.

Alteryx Designer Desktop Ideas

Share your Designer Desktop product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

Allow temporary local variables in formula tools

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) + "..."
else
    [Col1] + [Col2] + [Col5]
endif

versus

tmpstr = [Col1] + [Col2] + [Col5]
if Length(tmpstr) > 50 then
    Left(tmpstr, 48) + "..."
else
    tmpstr
endif

The idea is that the temporary variable has limited validity inside the formula for a specific cell.

 

3 Comments
patrick_digan
17 - Castor
17 - Castor

@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) + "..."
else
    VarTextRead("tmpstr")
endif

 

CristonS
Alteryx Alumni (Retired)

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 updatedSubmission Guidelines for any board or criteria related questions! 

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Status changed to: Accepting Votes