Skip to main content
All CollectionsBubble AcademyQuick Tips
How to Sort Dynamically Using Change Which Field
How to Sort Dynamically Using Change Which Field
Sofia Maconi avatar
Written by Sofia Maconi
Updated over a month ago

Transcript

In this Quick Tip, we’re going to look at how to sort dynamically using change which field.

In most cases, you would sort your search by using the Sort by dropdown and sort on a custom field from that data type, but then you’re limited to sorting only by that one field. Instead, we can sort by any of these fields by clicking Change which field.

When you do, a new input appears for you to enter a Dynamic field name. This dynamic field has to match one of the fields on your data type and it’s case sensitive.

The easiest way to demonstrate this, is using a dropdown element. By adding one to the page, we can create a list dynamically using an option set or statically on the dropdown, typing in exactly the custom fields on that data type. Once we do that, we can set the Dynamic field name and change which field to equal the Dropdown’s value and we'll set Descending to "yes" so most recent entries will show up top.

Now when we preview, we can sort by any of the fields on our data type dynamically.

That's it for this Quick Tip! For more, be sure to check out bubble.io/academy.

Did this answer your question?