Sorting Data By a Field's Position in a Separate List

Unit

  • Type (field type of “UnitType” (a separate data type of mine))
  • Department (field type of Department (a separate data type of mine))

Venue

  • PrimaryDepts (field type of Departments (a separate data type of mine), also a list)
  • SecondaryDepts (field type of Departments (a separate data type of mine), also a list)

The goal is to select units from the primary department that meet the criteria I’ve created and the correct amount based on what I’ve defined, and if there are less units that meet the criteria that belong to the primary department than the minimum amount I’ve defined, it will select from the SecondaryDepts field IN THE ORDER that the Departments were inputed. And it will go down the list of SecondaryDepts IN THE ORDER until it has selected the minimum amount of units.

In my API workflow (run on a list), I’m adding a list of units to a new data thing, but because I’m doing “Do a search for units” and adding a conditional where the unit’s department is in the Venue’s PrimaryDepts list and SecondaryDepts list, its sorting the units by when they were created in the database. How can I sort the units by Department AND that department’s position in the Venue’s list of PrimaryDepts and SecondaryDepts? Also, a department will never be in both lists (Primary and Secondary dept).

A quick one: when building on Bubble, try your best not to have too many lists, as it becomes difficult to handle when the data gets too large. You cant sort using a list

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