Edit expressions is too difficult

I’m finding myself writing complex expressions, and then the need to add or change something in the beginning. This means I have to delete the entire expression, including complicated filters I wrote. Is there any solution to this?

For example, if I want to change a filter, by adding a restrictive clause before it, I can’t. I either add it to the end and it has poor performance (or side effects) or I redo the entire expression (and all the filters).

1 Like

Hi there, @RPSM… what you described is one of the main things the new expression composer is supposed to solve. So, you can give the new composer a shot, but fair warning, it is still pretty buggy (Bubble knows that, and they are continuing to improve it).


The new expression editor helps with this. Also, if you turn on the Expression Parentheses option (Settings, Versions) this helps sometimes.

I’m using it, but I don’t see how to insert something before other things.

1 Like

It can be tricky, but as you hover over parts of the expression, you can click on those parts to change them or you can insert something by clicking a More link that should appear after the hovered part. If you share a screenshot of what you are trying to do, we might be able to help you figure out exactly how to do it.

Of course!

I am trying to modify the “Advanced” filter by adding a check for “This User’s Account” not being empty, right after the check for the list’s search filter not being empty.

Obviously I could just recreate the filter, I’m more trying to understand how to do this for the future.

When I hover, I get the different color bars, but there is no “more” other than the one at the end. So I can add something after the condition, but not before.

There should be a ‘more’ button between every part of the expression if you click in it… that’s one of the main features of the new expression builder.


so just click after the part of the expression you want to insert into.

That looks cool, but I don’t get that.

This is when I hover.

This is when I click.

Aha! I got it. If you click between the expression elements, a little blue cursor appears, and clicking there the “more” appears. Perfect (but not obvious). Let me try now.

1 Like

Unfortunately as it is not possible to click before the expression, it isn’t possible to add something before it. If you try to modify the expression, it doesn’t understand that you’re shifting the expression (making the new entry a part of it rather than a precedent condition). If this makes sense…

For anyone coming to this later, this is what I wanted to end up with. I had to recreate it, as the editing kept putting the “Account” checks as part of the Search checks.

I don’t really know what advice to give, but it is very difficult to change long expressions, and so far in my short time, it is the thing I most dread on using Bubble.

(Having said that, it is amazing that with the effort I’ve put in, I have a searchable, filterable, generic user table that I can use throughout the app).

Four things, @RPSM. :slight_smile:

First, oh hell yeah to this.

That’s Bubble in a nutshell, my friend.

Second, just a heads up that ignore empty constraints doesn’t work with advanced filters.

Third, in case you haven’t come across this info yet, advanced filters happen on the client (browser) side, so there could be a performance impact, depending on how many items are returned in the search that the advanced filter is filtering.

Fourth, when you have a lengthy advanced filter, you might want to take a look at your data types to see if adding a field here or there might help you optimize things a bit. I have no idea whether or not that is the case for you (I didn’t even read your advanced filter carefully), but just something to think about.

1 Like

Point #3 made me reflect, and I’ve moved the Account check to a pre-filter (not advanced), as that would definately be better to happen on the server. I’m getting good at rewriting this filter! :grinning:

1 Like