The Sort by Location button's script is quite something. You should look forward to that! First, we'll start with the Sort by Time button:
Edit the script of the Sort by Time button on the first card.
Type in the following short handler:
on mouseUp global gReminderData set the itemdelimiter to tab sort gReminderData numeric by item 4 of each showdata writedata end mouseUp
Get mentally prepared and then edit the script of the Sort by Location button.
Type in all of the following lines of code:
on mouseUp global gReminderData mobileStartTrackingSensor "location", true put mobileSensorReading("location", false) into tLocation mobileStopTrackingSensor "location" set the itemdelimiter to comma...