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 / Count Missing Field re...
Power Apps
Answered

Count Missing Field required

(0) ShareShare
ReportReport
Posted on by 901

Is there a way to count all Field Required when a user hit submit ? I have a survey with more then 17 questions that are required to be fill out.

 

Hope i explain it clearly. Happy Sunday!

 

 

Capture.PNG

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @oappdev 

    I feel like the only method do this is the tedious and long way...  You would add this code to the OnSelect property of your submit button.  Of course, I only did the first few fields but you would need to do them all

     

    My assumption is the error message is only Visible when there is an error.

     

    Set(errorCount,
     If(lbl_errorMsg1.Visible,1,0)
     + If(lbl_errorMsg2.Visible,1,0)
     + If(lbl_errorMsg3.Visible,1,0)
     + If(lbl_errorMsg4.Visible,1,0)
     ...
     + If(lbl_errorMsg17.Visible,1,0)
    )

     

    To reference the number of errors you would put this code in the Text property of a label (or elsewhere in your app)

    errorCount

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • oappdev Profile Picture
    901 on at

    Thank you as always @mdevaney Will give it a try and circle back 🙂

  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    @oappdev , I think you can simplify @mdevaney  formula by making a small tweak. Since visible returns true or false, you can add them together and then it will automatically use the numeric representation which is 1 for true and 0 for false.

     

    Example:

    Set(errorCount,
    lbl_errorMsg1.Visible + lbl_errorMsg2.Visible + lbl_errorMsg3.Visible + lbl_errorMsg4.Visible + lbl_errorMsg17.Visible

    )

  • oappdev Profile Picture
    901 on at

    Thank you both @Jeff_Thorpe @mdevaney  Will circle back

  • oappdev Profile Picture
    901 on at

    Happy Monday! @mdevaney @Jeff_Thorpe 

    Work like a charm! the only issue once the fields has value the count still show.

    * I only tested on 5 fields

     

    Capture.PNGCapture1.PNG

  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @oappdev 

    We can make the following changes to accomplish your goal.

     

    Put this code in the Text property of a label to the the count of missing values

    lbl_errorMsg1.Visible
    + lbl_errorMsg2.Visible
    + lbl_errorMsg3.Visible
    + lbl_errorMsg4.Visible
    + lbl_errorMsg5.Visible
    

     

    Change the Visible property of that label to this variable

    showErrorCount

     

    Then put this code in the OnSelect property of the button

    If Value(lbl_errorCount.Text) > 0, true, false)

     

    Now the error count will update "live" as the user makes changes and will only appear after the submit button was clicked.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • oappdev Profile Picture
    901 on at

    Thank you ! @mdevaney  👍 Will give it a try and circle back

  • oappdev Profile Picture
    901 on at

    Sorry for the delay. Finally got it to work with @mdevaney @Jeff_Thorpe solution

    Wish i could accept solution for both 🙂

     

  • mdevaney Profile Picture
    29,991 Moderator on at
    @oappdev
    You can definitely accept as solution for more than one answer!
  • oappdev Profile Picture
    901 on at

    Perfect! Thank  you ! Needed more coffee 🙂 Already accept both @mdevaney @Jeff_Thorpe solution

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
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 387

#3
timl Profile Picture

timl 344 Super User 2026 Season 1

Last 30 days Overall leaderboard