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 Pages / Duplicate detection be...
Power Pages
Unanswered

Duplicate detection before submit JS

(0) ShareShare
ReportReport
Posted on by 32

Hi all,

 

Can you tell me now to apply a duplicate detection rule to a portal basic web page form, that when the user clicks submits it will check my dataverse table to see if an entry already exists.  I was to check if the email address is already in the table and if it is then the user should be given an error message and the form cannot be submitted. 

 

Can this be done with JS as I am not familiar with plugin. 

 

Thanks

Categories:
I have the same question (0)
  • OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @ahilisa ,

    It can be done with JS but it might be a bit tricky from a security perspective. I would highly recommend you to do it via plugin if possible. However, if not possible you could do it with JS. I wouldn't recommend using Web API or fetchxml to query the data as you would need to provide your used Global access which in most cases is a problem. What you could do instead is create a Cloud Flow with Power Pages trigger, send an email as an input parameter, fetch data inside the flow and send true/false back to indicate if it is a duplicate or not. Then on the form, you can hide OOB submit button, and replace it with your custom one that on click will call a cloud flow to perform a validation.

  • EmadBeshai Profile Picture
    806 Moderator on at

    Hi @ahilisa ,

     

    As @OOlashyn it is recommended to use plugin if possible to control on the the error message, another solution is adding the alternative key but in this case you will be able to prevent the duplication, but you will receive the OOB error message without any control from your side except catching the error message and replacing it with JS, but I don't like that solution.

     

    If this post helps you with your problem, please mark this answer as Accepted Solution.

    If you like my response, please give it a Thumbs Up. 

     

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 Pages

#1
Fubar Profile Picture

Fubar 70 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard