Skip to main content

Notifications

Power Apps - Building 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:
  • Drrickryp Profile Picture
    Drrickryp on at
    Re: How do I check if a record exists before submitting a form?

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

  • Future_Vision Profile Picture
    Future_Vision 634 on at
    Re: How do I check if a record exists before submitting a form?

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

  • Verified answer
    Drrickryp Profile Picture
    Drrickryp on at
    Re: How do I check if a record exists before submitting a form?

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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard