Team,
I have a very restricted Sharepoint environment;
- no access to designer
- no access to Filter webparts
- workflows limited to (1) Approval (2) Collect Feedback (3) Collect Signatures (4) Three-state
So the only solution I think I have is javascript and client side rendering (which works ok).
Setup:
List #1 (Induction List)
Columns:
- Name - single line of text
- Work Instruction - Hyperlink
List #2 (Induction Status)
Columns:
- Name - Lookup (Induction List/Name)
- Assigned to - Person or Group (multiple selections = no)
- Completed - Date/Time (Date only)
On the page I have two views;
View #1 - Induction List
View #2 - Induction Status
Goal:
- display outstanding induction activities.
- view completed induction activities by who is logged on.
I can accomplish goal #2 by filtering the Induction Status list by Assigned To = [me]
Goal #1 is the trick.
For example, lets say I have 3 induction activities...
- Get Photo ID
- Get laptop
- Setup Email
The Induction Status list may look like...
- "Get Photo ID" "Bob" "01/01/2017"
- "Get Laptop" "Bob" "02/01/2017"
- "Get Photo ID" "Jane" "01/02/2017"
- "Get Photo ID" "Bill" "01/03/2017"
When Bob views the Induction Page, I want "Induction List" to hide list items that appear against Bob in the "Induction Status" list, which in this case would be "Get Email" (in other words only show the outstanding induction activities).
Based on all the restrictions in my environment, I was thinking create an array of all the "Name" list items in "Induction Status" where "Assigned To" = "Bob" then perform a client side rendering loop of all the items in "Induction List" and hide any item that has a match in the array (or use an item array that pre-exists in Sharepoint for lists in general).
I've read Targeting specific list with Client-side rendering
But not realy clued up on building the array and running the compare or hiding for that matter.
The other thought was joining the two lists together then only display items that the logged in user does not have a completion date for.
Any assistance, would be greatly appreciated.
Regards Michael