Hi, I got this to work by adding them to local collections. When you add them to collections it also gets the activitiesID.
ClearCollect(ActivitiesCol, Activities);
ClearCollect(PhoneCallsCol, 'Phone Calls');
ClearCollect(TasksCol, Tasks);
ClearCollect(AppointmentsCol, Appointments);
ClearCollect(ContactsCol, Contacts);
ClearCollect(AccountsCol, Accounts);
Gallery Items Filter Code = This filters it on the current user to get only there tasks.
Filter(ActivitiesCol, 'Owning User'.'Primary Email' = User().Email)
And then this on a label in your gallery - This looks up the activitiesId in each table, and if you find it then you know what record type it is.
Switch(
ThisItem.activityid,
LookUp(
PhoneCallsCol,
ThisItem.activityid = activityid,
activityid
),
"Phone Call",
LookUp(
TasksCol,
ThisItem.activityid = activityid,
activityid
),
"Task",
LookUp(
AppointmentsCol,
ThisItem.activityid = activityid,
activityid
),
"Appointment"
)
It seems to get all the related records to the 'Owning User' etc. But you can't click on it inside the powerapps like you normally would.