Add another sort option to Task database from the Starter Solution
I am using the Task database from the Starter Solution as is. I have added one additional edit field to the Task table called "Assignor" that requires the person entering the Task to put their name in. This is to be able to tell who created the Task. In the Tasks layout there is a sort button at the top that allows the layout to display the tasks according to what is selected on the sort button such as Category, Due Date, Time Frame, etc. I have added "Assignor" to the sort button and to the script and it works perfect. That way if Person A wants to see all the Tasks they have generated, they can select Assignor from the sort button and view all the tasks in the section under their name.
What I'm having an issue with is another existing field I would like to sort by. This is the Name field in the related Assignees table that is displayed on the Task Detail layout. The Name field indicates who the Assignee is of the task. I would like to add "Assignee" to the sort button as well. That way if Person A wants to know all the tasks designated/assigned to him, he can sort the list that way. I was able to add "Assignee" to the sort button and it does sort it out but I get 2 problems:
1) The headings have a "?" instead of the Assignee's name.
2) It doesn't list out the individual Task more than once if there is more than one person Assigned to that task. It only seems to grab the first assignee that was on the task and leaves the rest. I would like to see, when selecting Assignee from the sort button, a task that is assigned to Person One and Person Two be listed twice on the layout, once under Person One and once under Person Two.
I have attached a screenshot of my results. In my screenshot, task labeled "Task Test #1 and #2" has two assignees on that particular task - Assignee 1 and Assignee 2. However, it only shows Assignee 1 next to that Task on this list, where I am wanting to have this task shown twice, once for Assignee 1 and once for Assignee 2. Also, you can see "?" instead of "Assignee xx" on the headings.
Thank you in advance!