I\'ve created a function to index a certain value from another table. basically, i\'m querying these activities, often filtered on the context of the activityplans table.