In My App, my goal is to make the Leave Approval DataCard Display mode be disabled if the selected Leave Approver in the Mobile App is not the same as signed in User(). The following Code gives me an error:
If (
User().Email = LookUp('Leave Requests', LeaveApprover.Email = DataCardValue5.Selected.Email),
DisplayMode.Edit,
DisplayMode.Disabled
);
PS: I have added a People Picker Column titled "LeaveApprover" in the SP List Leave Requests.