Launch Of Improved Expression Assistant

We are excited to formally announce the launch of the improved Expression Assistant, with several features that make it easier and faster to write expressions.

Syntax highlighting

Syntax Highlighting

Colored text is way easier to read, and will help you notice if you forget a closing square-bracket or quotation mark.

  • Green - Functions
  • Pink - Data
  • Orange - Numbers
  • Blue - Text

Autocomplete

![Autocomplete|548x414](upload://7lws0JotbiE10oJM4lYq3uLexsz.png)

There is no need for you to remember (or type) the entire column name you wish to reference.

Whenever you type a [, the valid columns in your current context will be shown. You can navigate these with arrow keys or by scrolling. If you accidentally close the completions, you can reopen it by pressing Ctrl + Space.

Autocompletions even work for SELECT-like statements, and additionally can help you complete Table Names for functions that require them.

Function Guide

The arguments of the current function are displayed above the Expression Input, with the current argument highlighted.

In-Editor Documentation

Documentation is at your finger tips inside the Editor, saving you the time of having to navigate there yourself.

Minor Improvements

  • Autoclosing of brackets
  • Highlighting matching brackets
  • Maintaining indentation when starting a new line

How This Works

Rather than compiling expressions on our server, we now compile as you type in your browser. We compile your expression into a syntax tree, which allows us to understand exactly where in your expression you are. The syntax tree alone allows us to provide colored text, when combined with our documentation we can provide the function guide, and when combined with your data schemas we can provide autocomplete.

Rollout

Several of these features have rolled out to all users over the past couple months. Autocomplete is currently rolled out to free users and will roll out to paid users next week.

We hope this makes it easier to write expressions, and look forward to continuing to improve the Expression writing experience.

28 Likes

Love it!

:man_dancing: << Happy dance!

Sweet

Dark background would be nice!

5 Likes

Hi @wabrian ,

It’s fantastic to see the improvements you’ve made. I’ve noticed some changes on my AppSheet browser, and I wanted to bring a few things to your attention that you and your team may want to consider:

  1. The background color in the suggestion for Table/Column selection is quite faint.
  2. I’m unable to use the Tab key to indent a new line or use the Tab key to select a Table/Column in the suggestion section. (Perhaps I’m used to using the Tab key for those actions previously.)
  3. The suggestion for functions doesn’t work when typing the initial characters of the function.

Thank you,

3 Likes

Please consider updating row number lines and press to tab to choose suggested values like AppSheet toolbox.

2 Likes

Nice, but I hope that it will be able to perform the same tasks as the AppSheet Toolbox developed by the team at AppSheetTraining.com.

2 Likes

Thanks for the hard work.

For the time being, I think AppSheet Toolbox covers my needs better.

I think we need:

  1. Themes (at least dark mode, although this could be said for the whole editor)
  2. Functions, Tables and View name suggestions. I’m surprised it’s not already there TBH.
  3. Tab instead of “Enter” to take the suggested option. AppSheet Toolbox took the already standard Tab key that is used on coding environments and I don’t think Enter is a better idea at all.
  4. Tab for indentation. It’s great that if we add indentation manually it is respected when adding a line break, but add indentation manually again and again is not going to be fun in the long term.
  5. Row numbers for line breaks. This helps mainly with troubleshooting

I’d priorityze these in the following order:
2 - 3 - 4 - 1 - 5

3 Likes

I believe most IDEs allow the usage of both Enter and Tab key for selecting an auto-complete suggestion. This is certainly the first time I’ve ever heard of the usage of the Tab key for it, but it seemed to work in the few systems that I tried just now, where Enter also works. I definitely prefer Enter.

1 Like

Thanks for all the feedback! @diogolupcosta @T_I_Phong @hien_nguyen @Amine @SkrOYC @Marc_Dillon
I’ll discuss these with our UX designers and see what we can get done! We’ll definitely strongly consider all of these ideas.

5 Likes

Syntax highlighting, including dynamic parentheses matching, is thrown off in the presence of multi-byte characters. Here’s an example with emojis. Although it doesn’t appear in my screenshot, the cursor is just after CONCATENATE; you can see the open parenthesis is erroneously red as if it didn’t have a matching close parenthesis. I imagine this is far more consequential for languages with relevant writing systems, such as Chinese.

(BTW, the same applies to text functions that count characters, such as LEFT in this example, which includes * 2 to compensate. That’s not new, although I think I never reported it before.)

1 Like

This tool is nice, i think is better to sort the suggested order column as the schema sort.

1 Like

While our key/highlighter is on the expression input field, we wish to use “tab” key for indentation. Currently, it will move from Examples > Data Explorer > Table A > Table B … , which is not actually much useful. To make our formula aligned, we wish to use tab keyboard as it is so on the normal editor.

It is possible that we leave the existing tab key behavior as it is, but we wish to get another behaivor while the highlighter is inside the expression field.

@wabrian

6 Likes

Thanks for catching this bug. Fix hopefully coming out this week.

1 Like

ICYMI: Syntax highlighting disappears altogether if an expression exceeds some length. Maybe this is known or even by design, but I point it out in case it’s a related bug.

1 Like

Syntax highlighting stops working in two conditions:

  • the expression is invalid (or weird / or possibly a bug in our compiler)
  • parsing the expression takes more than 200ms. In my experience, this typically only happens for verry long expressions, or those that are constructed to be very deep syntax trees.

If you would care to share the expressions that are not syntax highlighting that would be great!

That’s handy to know. I suggest detail that in AppSheet Help documentation (cc: @lizlynch ).

It would be great to understand what qualifies as “weird”. I suggest also document those criteria.

One scenario where I commonly encounter this in long image URLs with multiple or long parameters. For example, a QuickChart URL requires a long JSON parameter that includes long arrays of data values and labels. I often populate those values using techniques like nested SUBSTITUTE functions and constructed lists.

So far I have been loving the new improvements but I think tab for indentation is a must have

3 Likes

Most definately

1 Like