cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Peter_Rutgers
Level: Powered On

Prevent duplicate if already exists in SP list based on 2 Column

 

If(
    IsBlank(
        LookUp(Stemminglijst_1;Title = Dropdown.Selected.Value && Datum = IsToday(Today()) ))
        ;Patch(Stemminglijst_1; Defaults(Stemminglijst_1); {Title: Dropdown.Selected.Value})
        ;UpdateContext({varShowPopup:true}))

DropDown  = List with custommers 
Datum = Date 

 

 

I would like to prevent a duplication in the SP list. The two conditions that are considered are the Title (dropdown) and the date(datum) of today. If these two combined do not exist then a "patch" may be performed.

 

Problem:
The Patch works any time, even when an item already exists. Is there a way to do this?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Prevent duplicate if already exists in SP list based on 2 Column

Hi @Peter_Rutgers 

 

Text(Datum,"[$-en-US]dd/mm/yyyy") = Text(Now(),"[$-en-US]dd/mm/yyyy")

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Prevent duplicate if already exists in SP list based on 2 Column

Hi @Peter_Rutgers 

 

As Datum is a date field

 

Datum = IsToday(Today()) is not correct

 

IsToday(Today()) - will return a true or false

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

Peter_Rutgers
Level: Powered On

Re: Prevent duplicate if already exists in SP list based on 2 Column

Hi @RezaDorrani , thanks for the quick response.

 

 

Datum is indeed a date field.

Do you have an idea what work? Have already used now () but that doesn't work.

Dual Super User
Dual Super User

Re: Prevent duplicate if already exists in SP list based on 2 Column

Hi @Peter_Rutgers 

 

Text(Datum,"[$-en-US]dd/mm/yyyy") = Text(Now(),"[$-en-US]dd/mm/yyyy")

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Peter_Rutgers
Level: Powered On

Re: Prevent duplicate if already exists in SP list based on 2 Column

Thanks for the support @RezaDorrani !

 

Text(Datum;"[$-en-nl]dd/mm/yyyy";"bg-BG") = Text(Now();"[$-en-nl]dd/mm/yyyy";"bg-BG")

Work for us now.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,001)