Hey there 👋
If you like no-code formulas, you will love this changelog!
Last week, the WeWeb team released not one, not two, not five no-code formulas.
No, no, no.
Last week, the WeWeb team released eleven new no-code formulas. 11
That's not all though.
We also added:
As always, we also fixed a few bugs because, you know, we're not perfect 😜
Ok, let's dive in.
You can now add an alternative workflow that triggers when the initial workflow failed, i.e. "On error":
If there's an error in workflow 1, it will execute workflow 2, meaning you can now display an error message when a workflow fails.
In the example below, we filter the collection based on a search bar input.
In the past, to display every item of the collection when the search bar was empty, we needed to add an "Apply if…" condition saying something like:
Now, we can simply toggle a setting "Ignore if empty" on the filter:
There are now 3 new query operators in no-code filters to help you search through arrays:
Here's a list of the no-code formulas the team added last week:
We'll deep-dive in the rollup and lookupArray formulas but you can learn more about every no-code formula in the WeWeb editor when you hover over the formula name:
In the example below, we are on a repeated item from our "Public Backlog" collection, looking for the "Type" of our test in the "Request type" collection:
In the past, in order to lookup an array one depth further in your collection, you would have needed to add a lookup depth to your collection here:
Lookup depth at collection level is extremely powerful but also very resource intensive.
On small projects, lookup depth didn't really cause any issues. It was seen as very practical because you only needed to work with one collection.
However, on larger projects, we found that lookup depth could create performance issues.
Suddenly, we had users loading huge datasets with 10 levels of depth in one page that only needed a small portion of the information from that collection.
That led to increased collection sizes and poorer performance because more data would be loaded in the user's browser.
With the lookup and lookupArray formulas, you can have unlimited depth without sacrificing performance.
How does it work?
In cached mode, this ensures that only the information you need is loaded on the page, greatly improving page load and performance.
The lookup formula is the sister of the lookupArray formula.
Instead of returning all the objects in the array in which the key is equal to the value, it only returns the first item.
In the example below, we have a collection – "Public backlog" – with a list of tests.
With the rollup function, we can look into that collection and return all the values in the "Public Status" column. The column name is called the "key."
Bound to a columns element in the navigator, this automatically displays 3 columns because we have 3 distinct statuses:
To recap, the formula above says:
Before the rollup formula, you would have needed to:
Now, you can streamline the design and improve the performance of your page by styling only one column and one card element that will be repeated by the collection list.
Another huge benefit of the rollup formula is when you use it to add a filter at collection level to fetch only the data you need:
Ok then, that was a productive week.
We hope you enjoy these new features and improvements!
As always, if there's anything you need help with, don't hesitate to:
Have a great week! 🙌
Sign up now, pay when you're ready to publish.