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

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

How to add validations in a form to avoid empty fields and an existing element?

(0) ShareShare
ReportReport
Posted on by 18
Hello everyone, this is the first time I add validations to a form with conditionals. I have a form where certain fields are disabled for certain users whose PIN value is 2, I added the following in the Displaymode If(varPin = 2, DisplayMode.Edit, DisplayMode.Disabled), but the fields that are enabled can't be sent blank. I already added in the properties that this value is required, but when sending the form, it doesn't submit anything. What can I do in this case?
Also, within this same form there is a field and I would like to know if the value of that field already exists within the SharePoint list called Inventory. If so, don't allow the form to be sent and show a message that the value already exists. Can this be done from Power Apps?
I really appreciate your help in advance!
I have the same question (0)
  • timl Profile Picture
    35,811 Super User 2025 Season 2 on at
    How to add validations in a form to avoid empty fields and an existing element?
    Hi 
     
    If you want to update an existing record on a form but unable to do so, you could try using DisplayMode.View, which makes the card read only rather than disabled.
     
    If(varPin = 2, DisplayMode.Edit, DisplayMode.View)
      
     
     

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 384 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 246

Last 30 days Overall leaderboard