Sorting or Ordering by a Foreign Key

I have a child table that has a FK in it.
Parent “thing” is auction
Child “thing” is bid, and one of the columns in bid is auction, and it’s of the data type Auction.

I am displaying a list of Bids on a page through a repeating group, and I want to display all of the bids for the same auction together. HOWEVER… in the dialog where you set the data source, search criteria - the only columns you can sort by are the non-FK columns (the other columns in the bid table), the dropdown to select what to search by doens’t have Auction in it.

Any Thoughts???

1 Like

Can you share a screenshot of what it looks like? What field are you trying to sort on?

Do a search for Auction : sorted (on your Auction id or whatever is unique) Bid’s

So that will sort the Auction records, and then return all their Bids.

It’s not available yet. On the roadmap : “Ability to sort / filter on sub-fields of things”

Right now, you must copy the date/text/number field used for sorting into the Thing you sort

Thanks for your honesty Nicolas.

So - even though the child “bid” has a column called “auction” (the parent) of data type auction, your suggestion is to have an additional column in the child bid table called “auction name” or “auction ID” - that is NOT a reference back to the parent, but it replicated data, so then the child can be sorted by that.

I think the application would be 1,000 times better with a relational back end rather than an OO back end. You would instantly have 100,000 users (all MS Access Users would LOVE this, and you could market to them as well).

In the case where you want to sort by a parent’s attribute, and you have a list of child things on the parent, then it is simple enough to search for the parent things, sort them, and then list out the children.

So, whilst the above is certainly true, in a lot of situations it is entirely possible to sort in the way you want.

That’s just ignorance… just put a foreign key or a reference or pointer back to the parent. That’s ALL that should ever be needed, because the child list, and any item in the list will have the key or reference to the parent right there.

That’s sooOOooooOoo much extra work, every time a child is added or deleted, I’ve got to go back to the parent and redo the list. REALLY? That’s efficient. NOT.

The World IS, genuinely relational - even outside of technology.

I’m glad I found this thread because I was going crazy trying to fix this thinking that it can’t possibly be this way. I hope that this finds its way from “ongoing” to “now” on the roadmap very soon!

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