I'm building an employee evaluation SharePoint list and I'm actually working with SharePoint integration to build a custom form.
In the OnStart property of my app in order for the form to open up on the right screen I am using a switch statement that looks at both the currently logged in User and what the Status Column on the list is set at. We need to do it this way because the list is intended to capture the whole evaluation process but different users are in play at different points.
Right now I have conditions in place where I am an Employee being reviewed and a manager of an employee it shows the 'Employee Submit Documents' screen. Likewise, if I hit the New Button in SharePoint to create a new record it pulls up the 'Employee Submit Documents' screen instead of the 'New Evaluation Screen'.
Can anyone tell me where I am going wrong? If it matters, Status is a Choice Column.
Set(CurrentUser, User());
Switch(CurrentUser.Email && SharePointIntegration.Selected.Status.Value,
SharePointIntegration.Selected.Employee.Email && "Not Started", Navigate('Employee Submit Documents'),
SharePointIntegration.Selected.Manager.Email && "Employee Uploaded Documents", Navigate('Manager Review'),
SharePointIntegration.Selected.Supervisor.Email && "Manager Submitted Review", Navigate('Supervisor Review'),
"HR@email.org" && "Supervisor Reviewed", Navigate('HR Review'),
SharePointIntegration.Selected.Manager.Email && "HR Reviewed", Navigate('Meeting Completed'),
[Navigate('New Evaluation')])