What I’m trying to do is have a repeating group display the projects name and priority sorted by the priority. I can get the unsorted results to appear but for the life of me I cannot figure out how to sort by the value of another table.
I’ve got 3 tables (or data types as buble calls them):
User which doesn’t come into play here
The 2 which are involved are:
Projects and “Project Priority”
Projects fields are:
name => text
priority => link to Project Priority
then the standard bubble fields (i.e. Creator, Slug, etc.)
Project Priority fields are:
priority => text
then the standard bubble fields
In sql assuming a database layout of:
Project (table):
id => int, primary key, etc
name => text
PriorityList_id => int
PriorityList (table):
id => int, primary key, etc
priority => text
The sql to accomplish what I want would be:
select name, priority from Projects, PriorityList where PriorityList_id = PriorityList.id order by priority;
I suppose the simple approach would be to not link the 2 tables and instead just make priority a text field that is entered via a dropdown whose values are based on the Project Priority table. But I get the feeling I’m going to need cross table sorting for other things.
Thanks,
Benjamin