web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error message with mis...
Power Apps
Answered

Error message with missing fields before submitting

(0) ShareShare
ReportReport
Posted on by 376

Hi there!

I have a form with four tabs in it. Each tab also includes some required fields. 

My wish would be to get a screen for the users after click Submit as follows:

 

All required fields are filled -> "Success, request has been submitted"

 

One or more required fields are missing -> "The following fields are required and not filled yet:  "Title", "Time", "Name", "Product", etc...

 

How can I do this?

 

Categories:
I have the same question (0)
  • narayan225 Profile Picture
    2,547 Moderator on at

    @IvenSch 

     

    You can change the Required property of the datacard to true. This will mark the field as required and won't submit the data unless the data cards have data in them.

    narayan225_0-1693986585170.png

     

    Hope this helps.

     

    Cheers!

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @IvenSch , the simplest method is to apply the below to the OnSelect property of your Submit Form button:

     

    If(
     'Your Form'.Valid,
     SubmitForm('Your Form'),
     Notify(
     "The following fields are required and not filled yet: 'Title', 'Time', 'Name', 'Product'",
     NotificationType.Warning
     )
    )

     

    And to apply the below to the OnSuccess property of your Form:

     

    Notify(
     "Success, request has been submitted",
     NotificationType.Success
    )

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    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.

    Imran-Ami Khan

  • IvenSch Profile Picture
    376 on at

    Ok, the warning notification is working in general. But instead of the text

    IvenSch_0-1693988097201.png

    Title, Time, etc. it just should show the real required fields that are not filled out. So e.g. if Title is missing it show title, if more are missing the field names should be shown.

     

    And it`t be great to get this notification as a pop up or separate screen.

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @IvenSch - I would personally use the out of the box Notification function, rather than navigating the user to a separate screen.

     

    I would approach it this way:

     

    If(
     Form1.Valid,
     SubmitForm(Form1),
     Notify(
     "The following fields are required and not filled yet: " & Concat(
     Filter(//generate a single column table of required fields names which are blank
     Table(
     {
     MyRequiredFields: If(
     IsBlank(DataCardValue1.Text),
     "Title"
     )
     },
     {
     MyRequiredFields: If(
     IsBlank(DataCardValue2.Text),
     "Name"
     )
     },
     {
     MyRequiredFields: If(
     IsBlank(DataCardValue3.Text),
     "Product"
     )
     },
     {
     MyRequiredFields: If(
     IsBlank(DateValue4.SelectedDate),
     "Time"
     )
     }
     ),
     MyRequiredFields <> Blank()//exclude required fields which have been filled in
     ),
     MyRequiredFields,
     ", "
     ),
     NotificationType.Warning
     )
    )

     

     

    Replace the DataCardValue names above with the actual DataCardValue names in your DataCards.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    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.

    Imran-Ami Khan

  • IvenSch Profile Picture
    376 on at

    There seems to be still a problem:

    IvenSch_0-1693998856388.png

     

    Seems to be from ","

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @IvenSch - please paste your expression as text.

     

    Looking at the image, the problem seems related to regional differences in the Operators. For example the semi-command may need to be a comma and the comma may need to be a semi-colon.

  • IvenSch Profile Picture
    376 on at

    I`ve changed comma to semi-colon like this:

     

    If(
    Form2.Valid;
    SubmitForm(Form2);
    Notify(
    "The following fields are required and not filled yet: " & Concat(
    Filter(//generate a single column table of required fields names which are blank
    Table(
    {
    MyRequiredFields: If(
    IsBlank(DataCardValue31.Text);
    "Title"
    )
    };
    {
    MyRequiredFields: If(
    IsBlank(DataCardValue32.Text);
    "Name"
    )
    };
    {
    MyRequiredFields: If(
    IsBlank(DataCardValue33.Text);
    "Product"
    )
    };

    );
    MyRequiredFields <> Blank()//exclude required fields which have been filled in
    );
    MyRequiredFields;
    ","
    );
    NotificationType.Warning
    )
    )

     

     

    But it`s still red underlined:

     

    IvenSch_0-1694002037758.png

     

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @IvenSch - it would be simpler if you copied my expression as written (with the commas/semi colons and parenthesis in the correct places), rather than me trying to point out the mistakes you have made with copying my suggested code.

  • IvenSch Profile Picture
    376 on at

    Here you are...

    If(
     Form2.Valid;
     SubmitForm(Form2);
     Notify(
     "The following fields are required and not filled yet: " & Concat(
     Filter(//generate a single column table of required fields names which are blank
     Table(
     {
     MyRequiredFields: If(
     IsBlank(DataCardValue31.Text);
     "Title"
     )
     };
     {
     MyRequiredFields: If(
     IsBlank(DataCardValue32.Sele);
     "Product"
     )
     };
     {
     MyRequiredFields: If(
     IsBlank(DataCardValue33.Text);
     "Name"
     )
     };
     
     );
     MyRequiredFields <> Blank()//exclude required fields which have been filled in
     );
     MyRequiredFields;
     ","
     );
     NotificationType.Warning
     )
    )
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @IvenSch - in my previous message I meant that you need to use the code I gave you. The code you shared had the commas/semi-colons in the wrong places.

     

    Also, I have no idea what DataCardValue32.Sele means.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 408

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 319

Last 30 days Overall leaderboard