Topic: How Can I Sort Returned Records Based On Virtual Attribute?
Sorry if this is a simple question - I'm totally new to all this.
I would like to build a site where the records returned as the result of a form submission are sorted according to a calculation based on attributes of the records and inputs from the form.
The Calculation would not be linear so I don't think I can create an attribute in the database to sort on and then just multiply it by the form input value when returning it to the results page.
I have thought of adding 10-100 attributes to calculate this value and then use the one that's closest to the input but I was hoping for a more elegant solution.
Any help with this would be much appreciated.