@nslbsa19
Based on what you are saying here, it seems like you might want a solution that could:
- Disable the 'Save Form' and 'Preview Form' buttons while the flow is in the process of running.
- Prevent further edits to a form once it's been sent for signature.
One way to approach this, could be to add an additional status field to your SharePoint list that tracks the form status.
You could have states like 'Editing', 'Awaiting Signature', 'Signed', etc.
Then, you can modify your Power Apps form and Power Automate flow to update this status accordingly.
The steps can be as follows:
1. Add Status Field to SharePoint List: Add a choice field to your SharePoint list. Name it 'Form Status' or similar and provide some choice values like 'Editing', 'Awaiting Signature', 'Signed', etc.
2. Update Status in Power Apps Form: In your Power Apps form, update the 'Form Status' field value to 'Awaiting Signature' when the form is sent for signature, and then to 'Signed' when it's returned.
3. Disable Buttons Based on Status: Set the DisplayMode property of your 'Save Form' and 'Preview Form' buttons to depend on the 'Form Status' field value.
4. Prevent Editing Based on Status: Similarly, you can prevent editing the form based on the 'Form Status'.
So, you can do this by setting the DisplayMode of the form to DisplayMode.View if the 'Form Status' is 'Awaiting Signature' or 'Signed':
If(ThisItem.'Form Status'.Value="Awaiting Signature" || ThisItem.'Form Status'.Value="Signed", DisplayMode.View, DisplayMode.Edit)
5. Update Status in Power Automate: When you send the form to be signed in your Power Automate flow, update the 'Form Status' field value to 'Awaiting Signature'.
When the form is signed and returned, update it to 'Signed'.
Make sure your Power Automate flow has the permissions to update items in your SharePoint list.