cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted

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
Highlighted
Dual Super User II
Dual Super User II

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.

 

Highlighted

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.

Highlighted

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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,900)