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 / power pages form - ver...
Power Apps
Unanswered

power pages form - verify if the record already exist before submitting

(0) ShareShare
ReportReport
Posted on by 8

Hello, 

 

I have a question regarding Business Rules, I am trying to avoid submitting the same data many times, so I am trying to set a business rule to validate if the email field on the form is already exist on the table or not. is there any way to achieve that. 

 

my form is on power Pages portal. 

AreejAlAbri_0-1714383456067.png

 

I have the same question (0)
  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @AreejAlAbri , 

    You should be able to utilize a Filter back to the table before you submit.

    // Query for existing email that matches
    ClearCollect(EmailCollection, Filter(Contact, email_address = <your text value of email field on form>));
    If(IsEmpty(EmailCollection),<execute your patch details here>,Notify("The email address already exists",NotificationType.Error));
  • AreejAlAbri Profile Picture
    8 on at

    Thank you for the help. 

    but where to place this code please? 

     

  • Fubar Profile Picture
    8,361 Super User 2025 Season 2 on at

    @dpoggemann is asking about Power Pages, not a Canvas App.

     

    @AreejAlAbri This is the link to the Power Pages forum https://powerusers.microsoft.com/t5/Get-Help-with-Power-Pages/ct-p/mpp_gethelp.

    There isn't a straight forward way to do this with Power Pages. You also need to consider if your form would also allow a bad actor to farm email addresses (e.g. use a bot to throw in random emails and record those that don't error, then send deceptive emails to your userbase).  Generally speaking, for checking records various options exist

    • use Power Pages Web API (basically make an ajax call to verify details)
    • Should also be able to do the same with a Power Pages Flow (will be similar to the Web API)
    • set the form settings to redirect to another page, then when the user submits the form, perform validation server side (plugin etc) and populate a field based on outcome, if the field is populated show the error etc on the redirected page
    • Write your validation in a realtime Dataverse Plugin or Workflow. There is a Site Setting that will allow the error message to be pushed back to the Page (note the Site Setting is not on by default and without it the use will see a 'nasty' error message)

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 739 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 268

Last 30 days Overall leaderboard