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 Apps
Unanswered

Prevent duplicates

(0) ShareShare
ReportReport
Posted on by 17

I have created a basic canvas app. I need to prevent duplicate entries based on two columns. My thinking was to combine the created by column with the date period column using concatenation on my SharePoint list and enable unique value required, but the created by column is a lookup which you cant use in calculated columns. I created a single line text column in my SharePoint list called combined and thought that I could combine a label and a data using the concatenate function in PowerApps, as a workaround. I cant figure out the formula. 

 

=CONCATENATE(DataCardValue10.Text,Label3.Text)  Required sample output:  John Smith01032022

 

Any ideas?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @TheTurnip 

    Calculated columns in your list are not relevant during the time a record is created.

    "Created By" is not a Lookup column, it is a record that contains the Person record.

     

    In your scenario, consider a LookUp function to perform what you need.

     

    In general, the formula such as this:

    LookUp(yourDataSource, 'Created By'.DisplayName = User().FullName && someOtherColumn = "01032022", true)

     In the above, I hand-wrote the value of "01032022" because you did not provide any context as to what columns you are working with (other than Created By) and where you are getting the comparison values from.

    But, the above formula will return true if such a record exists.

    This logic van be used on a Visible property, or in a DisplayMode property to control the user experience when a record is a duplicate.

     

    I hope this is helpful for you.

  • TheTurnip Profile Picture
    17 on at

    Hi, 

     

    The second column is called Period and it contains set dates. We want to prevent duplicate entries and the only way I could think of was by linking the Created by column with the Period column and if the lookup returns a True a notification will be displayed stating that its a duplicate record instructing the user to change the date and  button to accept, which when clicked will close the notification allowing the user to change the date. Time to see if I can work this out. Thank you for your help with this. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 528

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard