My PowerApps submits the New form and adds the item to the SharePoint list if all my fields are not mandatory. but once i start making some of the fields mandatory (required=Yes in column settings in Sharepoint) , my powerApps form cannot submit the form (cannot add new item) anymore, it keeps on showing the error "field required". It is somehow resets the inputs to the form only when the are mandatory ? What is happening ?
Hi @JenVitug,
If you make the field as required in SharePoint list, then you must provide a value for the corresponding field in the form control under PowerApps.
If the field is left with blank, PowerApps would then provide the error message.
Edit form and Display form controls in PowerApps
Refer to the save changes part.
Quoted:
"
When the SubmitForm function runs, it first validates the data that user wants to submit. If a required field doesn't contain a value or another value doesn't conform to some other constraint, the ErrorKind properties are set, and the OnFailure formula runs.
"
Regards,
Michael
Hi,
Of course when i made the fields mandatory, i provided inputs to these fields, but they are GETTING RESET when i click the SUBMIT button, hence the ERROR.
But when i removed the MANDATORY property in SharePoint for these columns, the inputs i provided in the same EDITFORM gets submitted successfully .
Hi,
Of course when i made the fields mandatory, i provided inputs to these fields, but they are GETTING RESET when i click the SUBMIT button, hence the ERROR.
But when i removed the MANDATORY property in SharePoint for these columns, the inputs i provided in the same EDITFORM gets submitted successfully .
Anyway, i have added a condition in for the SubmitButton.OnSelect such that it checks for IsBlank for all the mandatory fields and generate a customized error message. this is the workaround i have used for now.
What I found was that if you have another mandatory field in the list and is hidden in the edit form then it seems to give that error and reset the form. I have taken the mandatory property of the hidden field and it works.
Hope this helps
User | Count |
---|---|
247 | |
105 | |
82 | |
50 | |
43 |