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 / 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!
Liquid error: Exception has been thrown by the target of an invocation.Liquid error: Exception has been thrown by the target of an invocation.Liquid error: Exception has been thrown by the target of an invocation.
Categories:
  • Liquid error: Exception has been thrown by the target of an invocation. timl Profile Picture
    37,422 Super User 2026 Season 2 on at
    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)
      
     
     
    Liquid error: Exception has been thrown by the target of an invocation.Liquid error: Exception has been thrown by the target of an invocation.Liquid error: Exception has been thrown by the target of an invocation.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard