Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Required data

(0) ShareShare
ReportReport
Posted on by 335

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

Categories:
  • Francisco77 Profile Picture
    335 on at
    Re: Required data

    If I have several values that are necessary, I could use the IF function like Excel's IF(o(..))?.

     

    Thanks¡

  • SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: Required data

    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:

    SpongYe_0-1694642058032.jpeg

     

    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:

    SpongYe_1-1694642057584.jpeg

     

     

    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:

    SpongYe_2-1694642057588.jpeg

     

    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)
    )

     

    Source: https://powerusers.microsoft.com/t5/Building-Power-Apps/How-do-you-make-a-field-required-in-the-form/td-p/191190

     


    ------------------------------------------------------------------------------------------------------------------------------
    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1