Thanks!
I've created a calculated field by adding this to my dates.php file. It creates a negative number, with the more current date having a lower value than an older date. There is probably a better way to do this, but it works:
- Code: Select all
#This updates the DATES_SORT field.
mysql_query("UPDATE dates SET DATES_SORT = 100-STEP_DATE");
And in my relationships.ini file I now have this code to sort based on the calculated field, DATES_SORT:
- Code: Select all
[progress]
dates.APPLICANTS_ID = "$APPLICANTS_ID"
metafields:order = "dates.DATES_SORT"
How do I get the DATES_SORT field to be hidden in all views? I'm the only one who's ever going to view the field, and I can do that in phpMyAdmin.