To take it down to brass tacks, I have a List containing 100 various records. A Car has a Year, Make and Model.
I need to be able to :
-
order this according to Year, but I need to:
-
have all Cars that are Ford
Explorers appear as a “group” at the
end of my List (also ordered
according to Year)
I’m not sure if I’ll have to create 2 separate List and then merge them… seems like there should be a better way to do this than having to create multiple objects.
Your help is appreciated and welcomed!
Many Thanks,
paul
Example:
2001 Hummer H1
2002 Ford Focus
2008 BMW 325i
2008 Ford Escape
2009 BMW 328i
2009 Mitsubishi Galant
2003 Ford Explorer
2004 Ford Explorer
2008 Ford Explorer
2009 Ford Explorer
If you truly only want the Ford Explorers to be grouped, you can do the following:
What the above query does is create an inline value ,
isFordExplorer, and assigns it a boolean value using theletkeyword indicating whether the car is a Ford Explorer. That value can then be sorted by, along with the Year. The following is a working program that should demonstrate the concept: