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 / Power Pages prevent du...
Power Pages
Unanswered

Power Pages prevent duplicate entry and show error

(1) ShareShare
ReportReport
Posted on by 2

Hey there, I'm new to Power Portals. I've got a situation: I'm working with a form that has three fields. One of the field called "Your Company Name" is a lookup field. Here's what I need to do: I want to make sure that for each company, only one entry can be added to the Dataverse table each day. If someone tries to add a new entry for a company that's already been added on the same day, the system should show an error and stop them from submitting the form.
abhi_red_0-1693298133466.png

 

Can someone help me out on how it is possible to do it in power portals?

Appreciate your help. Thank you!

Categories:
I have the same question (0)
  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @abhi_red 

    I am not aware of any OOB way to achieve this. May be try power automate and check for the first entry date timestamp and reject the upcoming entries. 

     

    Alternatively, thinking out loud 

    1. Allow users to submit their entry 

    2. But don't process it to the next stage 

    3. Create an admin web role and assign approvers to view the request and only approve the valid entry to move on to the next stage. 

     

    Perhaps this will fit your scenario?  

    Throwing some ideas. Let us know what you think 

     

    Hope it helps.
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

     

  • Inogic Profile Picture
    1,135 Super User 2025 Season 2 on at

    Hi @abhi_red ,

    As another alternative, you can achieve this using WebAPI on Portal/Power Pages and Liquid Templates,

     

    Initially you have retrieved entries based on respective Company for today in advanced find within dynamics 365 CRM.

     

    For Retrieving the Entries, you can use Liquid or WebAPI.

     

    Download the fetchXml and use Liquid code to Retrieve the entry,

     

    You can store the Entry count in HTML container (<span> {{Entries Count}} </span>),

     

    Now you can create a duplicate button for submit which will click submit button of Form if the conditions are matched,

     

    On Click of Duplicate Button, we have to check that the Created span count have values,

     

    If the count is 1 then we can alert a popup with your Message to the user,

     

    Else click the Submit button of form,

     

    For WebAPI, You can refer to the blog given Below,

    https://www.inogic.com/blog/2021/03/execute-different-web-api-operations-using-powerapps-portals-preview/

     

    Please check and let me know if required any detailed steps to achieve the same.

    Thanks!

     

    Inogic Professional Services Division

    Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

    Drop an email at crm@inogic.com

    Services:  http://www.inogic.com/services/

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

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

    Just to add to the possible options, you could also only display the form if the count equals 0 else display a message.

    • use Liquid fetchml tag to run a fetchxml query to count the records
    • create a Liquid if block and check the count
    • e.g. in the if count equals 0 put the liquid entityform tag 
    • in the else put a html paragraph etc (or a content snippet)

     

  • ntsieny Profile Picture
    4 on at

    ntsieny_0-1694430540446.png

    You can create keys on dataverse table that you are saving at. You must select user(Lookup), company name and date column

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
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard