I have a dynamic link in an email to open a Powerapps form. Based on the status field in SP when the dynamic link is used Powerapps should see the status field is "X" open the form in "Y" mode. It works if I have a simple formula like:
If(!IsBlank(variableIDforDeepLink), FormMode.Edit,FormMode.New)But this does not address my need
But this is what I need to work:
If(!IsBlank(variableIDforDeepLink) && status.text= "Need More Info" || status.text="Pending" && !IsBlank(office),FormMode.Edit, If(status.text="Approved" || status.text="Rejected",FormMode.View,FormMode.New))
When I use the complicated logic it keeps showing a new form when I open the link even though it should be opening in other modes.
P.S. I also tried using the Switch functionality
Switch(Status.Text,"Need More Info",FormMode.Edit,"Approved",FormMode.View,etc.