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 do I check if a re...
Power Apps
Answered

How do I check if a record exists before submitting a form?

(0) ShareShare
ReportReport
Posted on by 634

I need to be able to check if a value exists in a record before the form is submitted.

 

For example.

 

  1. I have a field called campaign ID. All campaign ID's are unique and there should be only one record per campaign ID
  2. When the user submits I need to check to see if that campaign ID already exists. If it does exist then the form does not submit and a notification is given that it is not a unique campaign ID (control for capitalization would be needed. Probably convert the value in the field to all lowercase and then check against the data source which should also be converted to all lowercase on the fly for comparison)
  3. If the value is unique then the form submits assuming everything else on the form is valid.
Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    In the OnSelect property of the Submit button for the form, If(IsBlank(Lookup(SPlist, CampaignID=TextInputx.Text)),SubmitForm(Form1),Notify("...",Error))

  • Future_Vision Profile Picture
    634 on at

    Hmm. Is there an OnSubmit property? I only see the OnSelect property

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Yep, the onSelect property should be the formula I suggested. My mistake. Put your message In place of the ... In double quotes.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard