I have the following set of student records, each of them related to a specific teacher’s email.
[Objective]
The objective is that each teacher (column 3) receives the list of students he/she has been assigned from each assistant.
In that way
Assistant 1 would send 2 emails (to teacher 1 and 2)
Assistant 2 would send 2 emails (to teacher 1 and 3)
4 emails total
My initial attempt was the following:
(Assuming that the report runs as each Assistant in the Assistant App)
However, I have read that:
If that is true, and the report runs as the App Owner then:
This is not the desired behaviour so I’m thinking about alternatives.
[Alternatives]
I’m more inclined for option 2 given my current knowledge on Appsheet but I’m trying to find a more efficient solution, if any.
Thanks for any recommendation!
Luis
Thanks Steve!
I’ll put in practice this and the other answer from the other post and see what I get.
Thanks again for your time.
Luis
I have tried the suggestion but it’s not working as expected but I think the problem is inside my expression.
When I test the script it does the following:
When I played around the option “Create Report” the only difference was the frequency for which I got the emails:
I do think that I must put a condition inside my Report expression so I only get the Session’s information related to the email I’m sending the information to:
Otherwise the Report wouldn’t have the info to know what to send to each Teacher and just send the whole slice BUT I don’t know if the Expression can interact with / read the current email the Report is looking at.
When you use ForEachRowInTable, you don’t need a <<Start>>
tag with a SELECT() expression for the table the report is run from.
I suggest removing this <<Start>>
tag and its corresponding <<End>>
tag entirely:
<<Start:SELECT(Daily Session[sessionID], TRUE)>>
And replace this tag:
<<SELECT(Trainer[trainerName], ([trainerID] = [_THISROW-1].[trainerID]))>>
with:
<<[trainerID].[trainerName]>>
or (if that doesn’t work)
<<SELECT(Trainer[trainerName], ([trainerID] = [_THISROW].[trainerID]))>>
(Note [_THISROW]
rather than [_THISROW-1]
.)
User | Count |
---|---|
63 | |
25 | |
14 | |
11 | |
6 |