Greetings, community! I'm facing some challenges with Power Apps. My application enables users to complete a form (stored in a SharePoint database) for a specific service. There's a screen that allows them to search for and view previously created items using the same form (I've set a variable "varFormMode" to toggle the form between new, view, and edit modes as needed). The "Status" column, which is hidden from users, defaults to "Open". This column's value is automatically updated to "Approved" or "Repproved" by a Power Automate flow based on the user manager's criteria and an approval trigger in Teams. I'm attempting to implement an "Edit Form" on the "Consult Screen" where users can make edits only if their form hasn't been approved by their manager, or if the status is still "Open". If the status doesn't meet these conditions, a message should appear on the screen, and the form should be viewable in View mode only. I've tried the following code without any errors from PowerApps, but it's not functioning as expected. Could anyone assist me with this? Below is the code:
If(
DataCardValue15.Selected.Value = "Approved by Manager";
Set(
varFormMode;
FormMode.View
);
"Aproved";
Set(
varFormMode;
FormMode.View
);
FormMode.Edit
);;
Set(
varItem;
ThisItem
);;
Navigate(
scrnRequest;
ScreenTransition.Fade