Reports and UserEmail()

Not come across this before so I thought I’d share it.

When a Report runs and it’s set to ForEachRowInTable, any App Formulas or Initial Values with ResetOnEdit set are recalculated. Yet when a Report runs there is not logged in user. So any formulas using UserEmail() can be unpredictable.

In my case this:
ANY(Select(Staff[Hourly Rate 1],[Login Email]=UserEmail()))
simply chose the first Staff[Hourly Rate 1] it found and paid everyone the same hourly rate :grimacing:

Luckly I always have a column to record the email of the person who created the record. So I’ve simply replaced UserEmail() with that column.

2 Likes

3 Likes

I just thought the problem would be solved by turning on “bypass security filter “ simply … without dummy account etc. on the report settings