Dynamic field type for sorting - Help :)

Hey All,

I need a tiny bit of help :slight_smile: I am trying to sort dynamically, but keep coming up with an issue. I feel that it’s so simple, but I’m missing it.

Take a look: https://www.loom.com/share/0d1613f732774deeb49b1e17ef895d3b

Thank you!

I couldn’t follow your situation 100%, but here is my understanding of how to use “dynamic field”:

The dynamic field in my use cases is a custom state of type text within the page.
Then, the user can change which thing they want to sort on via workflows that update the dynamic field (custom state) with the exact name of the field.

Thank you for getting back to me… Let see if this helps: https://www.loom.com/share/0d1613f732774deeb49b1e17ef895d3b

Thank you!

It may be easier to share your editor in read only if you’re ok doing that.

Sure, here is the link: https://bubble.io/page?type=page&name=course_planner&id=omoffic&tab=tabs-1


Yes, you’re misinterpreting how the dynamic field works. This error message tells you what is needed:
Screen Shot 2020-05-22 at 2.24.44 PM

When you use dynamic field, you need to tell Bubble the EXACT name of the FIELD you wish to sort on via your workflows. Since “Core” is not a field within the Master Hours data type, Bubble can’t establish a field to sort on.

I didn’t choose sorting by “Core”. Im trying to filter by “type”. Core is the text in the record. Screen Shot 2020-05-22 at 11.29.37 AM

Right, but that text must match an exact field name. You don’t have a field called “Core”.

Wait, if you’re trying to sort on the field “Type”, just put that in as the search field. You don’t need to use dynamic field.

1 Like

Im not getting this haha. im sorry!

The type is dynamic that is the thing. I want the sort to first show the types of courses they are interested in that was chosen on the page before this.

Ah, but that is not what dynamic field does. Your requirement is something more like “dynamic priority” as opposed to dynamic field.

Let me ask a few questions to be clear on what you are trying to do (hang in there, we’ll get this sorted… no pun intended):

  1. For the sort order, if the user’s choice comes first, what is the sort order for the other records that aren’t the user’s selection?
  2. How many options (course types) are there?

Thank you for helping:)

  1. There are two types to sort by, Core and Elective. When the user selects one as their interest the system should sort to show that type first, the rest are under that. It might be nice to also soft alphabetically, but one step at a time haha.

  2. There are maybe 60 courses.

Hope this helps!

Im seeing something here. I just want to sort be ascending or descending based on that choice.

Ok, try this:

Set up your default search as follows:
“Do a search for courses with type = core merged with do a search for courses with type = elective”
Then have a condition that says
“When user choice = elective” change the data source to
“Do a search for courses with type = elective merged with do a search for courses with type = courses”

The beauty of doing it this way is that you can then set the sort within the actual data source to be alphabetical and then you would have effectively sorted first on course type and then alphabetically.

I figured it out… haha it was simple. Im using conditional formatting hahaha :slight_smile: Wanna see?

Glad you figured it out @ben4! :+1: :+1:

Thank you for helping :slight_smile:

1 Like

Sure thing.

This topic was automatically closed after 70 days. New replies are no longer allowed.