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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / check for duplicate fr...
Power Apps
Unanswered

check for duplicate from previous entries and pop up window if there is duplicate entries.

(0) ShareShare
ReportReport
Posted on by 82

Dear Power Appers, 

 

I have my first App ready and some users have already tried to play with it. Then I ran into a problem with duplicated entries from same user. 

The user did not realize that he already entered the same information before. For example, the user is supposed to input their travel expenses for each month. One of them entered and saved his expenses in July twice. 

I want to build a 'check' function when user press submit button. To check whether the current user has already saved data based on the Year and month. In the app, user is supposed to type in their email address, year, month and expense. If same year and month for the same user already exist, then a pop-up window will show and state " Entry already exists. ".

 

I already knew how to set up the pop-up message. By setting the OnSelect property for 'Submit Button' with 

 Notify("Entry already exists."), SubmitForm(EditForm1))

 

How can I realize this 'check' function? 

 

Best regards,

exploringG

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @exploringG ,

    Hope you are doing well.

    If I understand your question correctly, then please try this formula on submit button:

    If(CountRows(Filter(DataSource, User= CurrentUser And Year = YearSelectedByUser And Month= MonthSelectedByUser))>0, Notify("Entry already exists."),
    CountRows(Filter(DataSource, User= CurrentUser And Year = YearSelectedByUser And Month= MonthSelectedByUser)) =0, SubmitForm(EditForm1))

    I hope this helps.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs.

    Thanks,

    ANB

     

     

  • exploringG Profile Picture
    82 on at

    Hi @ANB ,

     

    First of all, thank you for your solution. I realized that I already have an 'if' formular inside of my submit button. It's calculating the total of all datacard values. 

    If(Sum(Value(DataCardValue11.Text), Value(DataCardValue12.Text))<>1, Notify("Summation of percentage must be 100%"),SubmitForm(EditForm1))

    Can I put your formula inside the 'If' function as well? I have a delegation warning and also 

    The 'CountRows' operation is not supported by this connector.


    This is how I arrange my formula for the submit button.

    If(Sum(Value(DataCardValue11.Text), Value(DataCardValue12.Text),Value(DataCardValue13.Text))<>1, Notify("Summation of percentage must be 100%"), CountRows(Filter(ProjectResourceExcel, User= CurrentUser And Year = DataCardValue9.Text And Month= Dropdown3.SelectedText))>0, Notify("Entry already exists."),CountRows(Filter(ProjectResourceExcel, User= CurrentUser And Year = DataCardValue9.Text And Month= Dropdown3.SelectedText)) =0,SubmitForm(EditForm1))

    The 'Month' entry in my App is a drop-down list from 1-12.

     

    When I run the App, there is no Error message popping out if I enter duplicate data and also the EditForm does not get to be saved at all. 

     

    Best,

    exploringG

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @exploringG ,

     

    You need to use the formula in this way:

    If(Sum(Value(DataCardValue11.Text), Value(DataCardValue12.Text),Value(DataCardValue13.Text))<>1, Notify("Summation of percentage must be 100%"));
    
    If(CountRows(Filter(ProjectResourceExcel, User= CurrentUser And Year = DataCardValue9.Text And Month= Dropdown3.SelectedText))>0, Notify("Entry already exists."),CountRows(Filter(ProjectResourceExcel, User= CurrentUser And Year = DataCardValue9.Text And Month= Dropdown3.SelectedText)) =0,SubmitForm(EditForm1))

     

    For Month, use dropdown.Selected.Value

     

    I hope this helps.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs.

    Thanks,

    ANB

  • exploringG Profile Picture
    82 on at

    Hi @ANB ,

     

    I'm still having delegation warning and the EditForm could not be submitted or saved. 

    This is the full code.

    If(Sum(Value(DataCardValue11.Text), Value(DataCardValue12.Text),Value(DataCardValue13.Text),Value(DataCardValue14.Text),Value(DataCardValue15.Text),Value(DataCardValue16.Text),Value(DataCardValue18.Text),Value(DataCardValue19.Text),Value(DataCardValue20.Text),Value(DataCardValue21.Text),Value(DataCardValue22.Text),Value(DataCardValue23.Text),Value(DataCardValue24.Text),Value(DataCardValue25.Text),Value(DataCardValue26.Text),Value(DataCardValue27.Text),Value(DataCardValue28.Text),Value(DataCardValue29.Text),Value(DataCardValue30.Text),Value(DataCardValue31.Text),Value(DataCardValue32.Text),Value(DataCardValue33.Text),Value(DataCardValue34.Text),Value(DataCardValue35.Text),Value(DataCardValue36.Text),Value(DataCardValue37.Text))<>1, Notify("Summation of percentage must be 100%"));
    
    If(CountRows(Filter(ProjectResourceExcel, User().Email And DataCardValue9.Text And Dropdown3.Selected.Value))>0, Notify("Entry already exists."),CountRows(Filter(ProjectResourceExcel, User().Email And DataCardValue9.Text And Dropdown3.Selected.Value))=0,SubmitForm(EditForm1))

     I have a lot of datacards. For clear visualization and that's why I didn't include them all in the previous post. However, could this be the reason of delegation? But without the 'CountRows', I did not encounter delegation problem. 

     

    Best,

    exploring G

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @exploringG ,

     

    Can you send me the screenshot of delegation warning? I mean on which column you are getting delegation warning?

     

    Also, in filter function, you need to have the condition with respect to column. Please check the below formula.

     

    UserEmail

    Year

    Month

    The above are column name, please use dedicated names of column.

    If(CountRows(Filter(ProjectResourceExcel, UserEmail = User().Email And Year = DataCardValue9.Text And Month = Dropdown3.Selected.Value))>0, Notify("Entry already exists."),CountRows(Filter(ProjectResourceExcel, User().Email And DataCardValue9.Text And Dropdown3.Selected.Value))=0,SubmitForm(EditForm1))

     

    Thanks,

    ANB

  • exploringG Profile Picture
    82 on at

    Hi @ANB ,

     

    This is the screenshot. 

    delegation.PNG

     

    Best,

    exploringG

  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @exploringG ,

     

    Please check this:

     

    In filter function, you need to have the condition with respect to column. Please check the below formula.

     

    UserEmail

    Year

    Month

    The above are column name, please use dedicated names of column from Data Source "ProjectResourceExcel"

     

    If(CountRows(Filter(ProjectResourceExcel, UserEmail = User().Email And Year = DataCardValue9.Text And Month = Dropdown3.Selected.Value))>0, Notify("Entry already exists."),CountRows(Filter(ProjectResourceExcel, User().Email And DataCardValue9.Text And Dropdown3.Selected.Value))=0,SubmitForm(EditForm1))

     

     

     

    I hope this helps.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs.

    Thanks,

    ANB

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard