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 / Mandatory fields but o...
Power Apps
Answered

Mandatory fields but only if they are visible

(0) ShareShare
ReportReport
Posted on by 5

I got a question.

I'm building an app and there I have multiple fields which should be mandatory fields but only if they are visible. So that i can press the "Submit"-Button only if the visible fields are filled with content.

I hope anyone can help me solving this problem.

 

Best greetings

PowerAppsUser

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Ok, try this:

     

    If(

    IsBlank(Field1.Text) || IsBlank(Field2.Text),

    //Fields need information, they are blank ,

    //You can submit

    )

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    My website!

    My blog!

  • Verified answer
    Akser Profile Picture
    1,546 Moderator on at

    Hi @PowerAppsUser5,

     

    I guess you can achieve that with the use of DisplayMode property of your submit button:

     

    If(
    	TextControl.Visible = true And IsBlank(TextControl.Text), 
    	DisplayMode.Disabled,
    	DropDownControl.Visible = true and IsBlank(DropDownControl.Selected)),
    	DisplayMode.Disabled,
    	//You can add as many conditions as you like
    	DisplayMode.Enabled
    )

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You can set the Required attribute in the Datacard and handle it somewhat that way but to truly handle it within a form isn't really a thing i have for that reason two diffrent sharepoint lists (only if you use sharepoint are any of my said things in context). Then i set the visability dependent on the requirements (with the other method i was able to submit null values if somehow the datacard didn't update properly (possibel inconsistency issue only on super rare events but it happens)). 

  • PowerAppsUser5 Profile Picture
    5 on at

    I tried one solution and I think it's a good one but there's still any mistake.

    In the added picture you can see what I've done. I tink the mistake is somewhere at the end.

     

    Problem Power App.PNG

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard