Hi Community,
I have a Power Apps and I would like to make some dropdown lists, date and text labels mandatory to complete to send the data to a sharepoint list. How do you do that?.
Regards,
Francisco
Announcements
Hi Community,
I have a Power Apps and I would like to make some dropdown lists, date and text labels mandatory to complete to send the data to a sharepoint list. How do you do that?.
Regards,
Francisco
If I have several values that are necessary, I could use the IF function like Excel's IF(o(..))?.
Thanks¡
Hi @Francisco77
How do you submit your form data? Using SubmitForm function or Patch function?
If you use the SubmitForm function to submit your form data, please consider take a try with the following workaround:
Set the Required property of the Data card property (related to the field you want to mark as Required) to following:
true /* <-- A boolean value */
then the Data card would be marked as Required with * sympol. When you submit your form without having value in that field, the error message would show up:
If you use a Patch function to submit your form data, I think the If function could achieve your needs. You could consider check if the corresponding field within your Edit form is populated with values using If function. If not, don't patch your form data into your data source.
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Submit" button to following:
If( IsBlank(DataCardValue9.Text), Notify("The Required field could not be blank, please provide a value for it", NotificationType.Error), Patch('20181122_case14', Defaults('20181122_case14'),EditForm1.Updates) )
On your side, you should type:
If(
IsBlank(DataCardValue9.Text), /* <-- DataCardValue9 represents the Text Input box within the corresponding field Data card */
Notify("The Required field could not be blank, please provide a value for it", NotificationType.Error),
If(
EditForm1.Mode=FormMode.New,
Patch('YourSPList', Defaults('YourSPList'),EditForm1.Updates),
Patch('YourSPList', BrowseGallery1.Selected,EditForm1.Updates)
)
)
In addition, when using SubmitForm function to submit your form data, you could also consider use If function to check if the corresponding field within your Edit form is populated with values, if not, don't submit your form data:
If( IsBlank(DataCardValue9.Text), /* <-- DataCardValue9 represents the Text Input box within the corresponding field Data card */ Notify("The Required field could not be blank, please provide a value for it", NotificationType.Error), SubmitForm(EditForm1) )
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1