Hello,
I try to filter a data table by two criteria and sort it after that. Basis of the table is a sharepoint list.
The following formula works:
Sort(Filter('Zeitdaten Mandanten';Bearbeiter = 'Office365-Benutzer'.MyProfile().Mail;'Datum und Uhrzeit'= DateValue1.SelectedDate);'Datum und Uhrzeit';SortOrder.Ascending)
The problem is delegation. Calling the Office365 user function makes it impossible as far as I have understood.
So I tried to swap the Ofice365 Email into a global variable, i call this function before i open the screen with the DataTable.
Set(VariableMail;'Office365-Benutzer'.MyProfile().Mail)
Unfortunately the following formula do not work :
Sort(Filter('Zeitdaten Mandanten';Bearbeiter= VariableMail;'Datum und Uhrzeit'= DatePicker1.SelectedDate);'Datum und Uhrzeit';SortOrder.Ascending)
The strange thing for me is, the first part:
Filter('Zeitdaten Mandanten';Bearbeiter=VariableMail)
works. But not in combination with the second condition (which i didn´t change). The second condition alone:
Filter('Zeitdaten Mandanten';'Datum und Uhrzeit'= DateValue1.SelectedDate)
Doesn't work either. This is where my understanding ends. Why does it work in combination with Office365 users, but not with the variable or alone?
Thanks a lot!