Hi! I started experiencing a weird issue with my production level canvas PowerApp around month ago. Before that the same app worked like a charm. What it does it handles my customer's recruiting process through SharePoint List based implementation with canvas PowerApp. The app itself contains quite complex logic but the error I'm receiving comes from simple save scenario.
Each recruitment process is an individual SharePoint list item. The status of process is based for one SharePoint list column and based for this status end users are able to fill recruitment process information splitted to multiple PowerApp screens. These screens contains a standard form control and selected set of list columns which are submitted back to SharePoint through SubmitForm() function.
SubmitForm() can be executed in two different ways:
1) Separate Save-button
SubmitForm() is called in "OnSelect" event of this separate button. Saving always works whenever the form is valid (required fields are filled)
OnSelect()
-----------
Set(ShowLoading, true); // Show my custom loading screen
Refresh('My Data'); // Refresh my SharePoint data connection
SubmitForm(BasicInfo); // Submit form
Set(ShowLoading, false) // Remove my loading screen
2) SubmitForm() is called in OnHidden event of the screen in case customer navigates away from screen through navigation and doesn't press the save button separately. This scenario started to fail randomly with "An entry is required or has an invalid value" error on some fields of the form. Strange thing is that usually a second try is successful with exactly the same valid data added to fields which are failing at the first try.
OnHidden()
-----------
If(Form.Unsaved && form.Valid, // Check for unsaved changes and validity of the form to avoid unnecessary saves
Set(ShowLoading, true); // Show my custom loading screen
Refresh('My Data'); // Refresh my SharePoint data connection
SubmitForm(BasicInfo); // Submit form
Set(ShowLoading, false) // Remove my loading screen
)
I'm starting to run out of options - Already tried these steps based on forum discussions:
- Deleted and re-added the problematic form on screen
- Deleted and re-added the whole data connection on background
- Made sure there is no required fields on SharePoint list in background (Required fields are defined in PowerApp forms only)
- Enabled/Disabled "Delayed Load" preview/experimental feature
- Made sure there shouldn't be any other errors in place (like said error is random and saving works usually with second try and with separate save-button)
What next? Like said there are only minor changes done to PowerApp itself and this behavior started around month ago after application has been working months in production without issue.