Name formulas with `Name=5`

Exactly what it says in the title.

It would make creating variables a lot easier.

Hi Connor, does the current implementation of naming a formula and variables not work for you?

https://cl.ly/1h3s33321243/Image%202018-07-23%20at%201.18.24%20PM.png

Would love to understand your scenario more/

It does, it just takes an extra step or two compared to what it could be. Naming a variable while programming in any language is easy: just type its name an equal sign and the value.

This requires me clicking twice. Because of this it seems like variables are not intended to be used heavily for statefulness. I don’t know if that’s true, but I’ve partially avoided them because of that and stayed with tables.

As an example of how easy it could be, look at how you can TAB to create a new table. Creating variables should be that easy - assuming it’s something that people are to be encouraged to do.

Thanks for the feedback. Something for us to look into - maybe some shortcut for power users. Our thought here was to provide the ability while not displaying this in the doc or making it something that a user feels that they have to do with every formula.

Oh I agree 100% . I’m hoping I could write Name=5 and it could collapse into a named function named Name. Or a shortcut would work. Or autoselecting the Name field when clicking the dropdown would at least reduce the clicks by one.

Is there a way to create variables for stateful formulas? Like for example if I am doing a SwitchIf, and I want to use the same filter result in each case, and the filter uses something like currentValue. Is there a way to save the filter to a variable so that I can use it in each case?

Not only does this make the formula much easier to read, but it also would presumably be much more efficient.

Thanks!