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

Notifications

Announcements

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

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard