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 Apps / Primary column with Au...
Power Apps
Suggested Answer

Primary column with Autonumber datatype has duplicate value

(1) ShareShare
ReportReport
Posted on by 38
The datatype of the primary column is set to text Autonumber, and the column is locked so it generates the value itself. I now populate the table from a CSV file, which also includes that same primary column. Now the column is still generating duplicate values of what are the same values from the populated datasets. 
 
How can I stop duplicate values from being generated in this scenario???????
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,488 Super User 2025 Season 2 on at
     
    Please share pictures, bring us along with you as we cannot see the table, the column configuration, the data, nothing.
     
    Walk us through how you imported the data, and how afterwards its creating duplicates. 
     
    Cheers
  • Suggested answer
    Pol Escolano Profile Picture
    10 on at
    Hi,
    The major problem I see here is the "TEXT column", if it's an autonumber column I recommend change it to a "Number" column. 
    Then, make sure your column have a "no duplicates" configuration on it,

    If all this does not work, create a flow to normalyze everything, this is good for the existing wrong rows, in power apps would be something like this:
    ForAll(
      Sequence(CountRowsa(table)),
      With( {
          itemActual: Last(FirstN(columnNumber, Value))
      },
       Patch(
          table,
          LoopUp(
              table,
              Id = itemActual.Id
          ),
          {
              columnNumber: Value
          }
        )
      )
    )
     
  • Michael E. Gernaey Profile Picture
    53,488 Super User 2025 Season 2 on at
     
    That is a bad idea. 1) Dataverse doesn't support autonumbers that are just numbers 2) it is not a process that will guarantee stop duplicates as if you have multiple clients running at the same, if you have multiple apps that can run at the same time. It won't work.
     
    Thats why I want to see what the user is importing. As they should be letting the System generate the Value, NOT importing it, which will break the intent of autonumber.
     
    I can do the same thing with SQL and just enabling insert Auto which is essentially what happened here
     
    Need to see exactly what is being imported, so we can resolve the issue, an dhow its being imported
     

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard