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 Platform Community / Forums / Power Apps / How to add validations...
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!
Categories:
I have the same question (0)
  • timl Profile Picture
    36,319 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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard