Hopefully, I can explain this as it is hard to show a code example at the moment.
Lets say I have tiddlers with names of people in the title
Bob
Sally
Steve
Now, let’s say I have other tiddlers called LifeEvents. Life Events are kind of related to the people tiddlers such that there are fields called:
person
event
date
So, there would be a tiddler called LE-12345 (the title isn’t important, it is basically a GUID)
and the fields of LE-12345 are:
person: Bob
event: Birth
date: 19600715
And we’d have one for each person. This design lets there be any number of LifeEvents related to a person. e.g., Marriage, Lived at 123 Main Street, Joined the Navy, whatever
There might be a performance hit because of this design but anyway, here’s my question:
I have a $List of people. During the run, a macro is called that looks up the CurrentTiddler among the LE tiddlers to pull back the Birth event date.
That I have kind of figured out but what I really want to do is use the result of that macro (in my Bob example, the value of 19600715) as a sort value so that all the people are sorted by their birth date.
Obviously, the easiest is to scrap the idea and simply store the birth date on the Person tiddler but I want to see if it could be done this way.
Can a list sort like this be done?
Thanks for helping with my crazy idea,
Scott