Hi
I'm trying to create a staff course app
I have created a collection of users based on Office 365 group members
Then I have SharePoint lists :-
I linked the course registration collection to the users list collection using
ForAll(
selectedGroup As groupRecord,
Collect(
UsersList,
AddColumns(
Office365Groups.ListGroupMembers(groupRecord.StaffGroupID).value,
"GroupType",
groupRecord.Title,
"Establishment",
groupRecord.StaffGroupEstab,
"Training",
Filter(
StaffTrainingRegister,
mail = attendee_email
)
)
)
);
Under Search, I have a list of course checkboxes along with an expiry input box that populates a selected course collection with
Course Title & Expire
I then build another collection based on the courses selected using
ForAll(
selectedTraining As tlist,
Collect(
FilteredList,
Filter(
UsersList,
tlist.selected_course in Training.course_completed,
If(
!IsBlank(tlist.expires),
If(
DateDiff(
Now(),
DateAdd(
DateTimeValue("21/05/18"),//replace with user course completion
Value(tlist.course_renewal),
Years
)
) < Value(tlist.expires),// if datediff < entered days
true
)
)
)
)
);
Which filters users based on selected courses.
Now I want to filter out expired/close to expiry
The problem I am having is targeting the completion date within Training > user course collection.
I have manually entered a date to get it working I need to replace this with Training.completed_date
Any Idea?
I have a feeling I need another ForAll(
User | Count |
---|---|
121 | |
88 | |
88 | |
75 | |
66 |
User | Count |
---|---|
215 | |
180 | |
138 | |
96 | |
82 |