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 / added for a dataverse ...
Power Apps
Answered

added for a dataverse table a column with type autonumber but canvas app cannot add new rows

(0) ShareShare
ReportReport
Posted on by

hi,

I created a canvas app and there is a tblKapitel with column ID, but it's type is whole number.
I needed to change the ID to Autonumber which is not possible in a straight way.
The only way I found was to export the table as excel file, add to tblKapitel the new column ID2 as autonumber and then import the excel file again.
Import was ok and ID2 values where filled.

 

I adapted the canvas form (added ID2, deleted the datacard ID) but when trying the canvas app does not allow me to add new rows.
Editing existing rows is possible. And yes, I published the tblKapitel after the change.
And also tried with another browser (chromium) but adding a row still fails with this error message:

 

cannot be saved. Check whether there are any errors in the form

 Whats going on here?🙄

thx

I have the same question (0)
  • Mahendar Pal Profile Picture
    191 on at

    Hi,

     

    Please recheck your expression, there should be something else which is causing issue , I tested it will a dummy student table which has Roll No as a autonumber and it's working fine as you can see I am setting only two field.

    Patch(Students,Defaults(Students),{'Primary Name':DataCardValue3.Text,Name:DataCardValue1.Text})
     
    It's working fine.
  • candide Profile Picture
    on at

    All I saw in the form was the Save button with error:

    the new_ID field is required

    which led me to the error.

     

    It was tricky to find out but I had an old column ID (the new is named ID2) and column ID was still set required. I changed it to optional and now I can save a record.

     

    That's fine.

     

    BUT...

    as stated above I exported the table to Excel, added column ID2 and imported in Dataverse.

    But the new added table row starts with 1 and NOT with something like Max(ID2)+1 as expected.😖

    Seems I will try the export/import again and see?

  • Verified answer
    candide Profile Picture
    on at

    the way that was my solution:

    export the table. You will see that the column ID2 which is Autonumber will not be exported. Then I deleted ALL the rows in the table.

    The seed of ID2 should start with 1 and has 4 digits so it starts with 0001.

     

    Then the import from Excel was executed. In my example it starts with 0002 instead the expected 0001 - whatever the reason is - its not so important as it's an artificial key column. More important it never has duplicates and entering a new row via canvas form the ID2 is correct [like Max(ID2) plus 1]

    😀😁

    thx to all

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