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 / Is there a way to find...
Power Apps
Answered

Is there a way to find the ID of a new created column before it is created?

(1) ShareShare
ReportReport
Posted on by 68

Hello,

im trying to build an app right now were i have to fill in a form so it can be send to the dataverse. And after that the ID will be automaticly generated in the dataverse itself. Now here is my problem i need this id even before i send it to the Dataverse Table.

 

I hope i can get an answer fast

Best Regards

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @TheFabonator 
    First I believe you mean the ID of a newly created Record (row), not column.
    And the answer is No, the primary key of any data source including Dataverse cannot be found out before the record is created, as it does not exist at all yet. You must first create the record with the minimum info, retrieve it, then edit it further.
    The ID is also the name of the primary key in SharePoint List.

    In Dataverse it is not called ID like in SharePoint List.

    The primary key is of type GUID in Dataverse and it is usually the singular name of the Table in Dataverse.

    If your Table is called Clients, the primary key column is usually named Client when trying to refer to that column in Power Fx.

    See if this helps @TheFabonator 

  • TheFabonator Profile Picture
    68 on at

    Thx for the fast answer @poweractivate.
    As a follow up question is there a possibility to get the "ID" from a the most recently created row so i can just increase it by one?
    I know this isnt the optimal solution for my problem but it could help.

    Best Regards

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @TheFabonator 

     

    Dataverse creates GUID which is not sequential and is internal implementation.
    SharePoint Lists "ID" primary key automatically increment by 1 and are simple autogenerated numbers in sequence.

     

    You cannot control the implementation of the primary key of either one, and in Dataverse it is not a sequential number.

    If you want an autogenerated sequential number, Dataverse has an AutoNumber

    It's a type of column you can use by adding it to the Table and it may suit your needs.

    This is not going to be the "primary key" though, but it may be better than that and achieve what you want. 

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @TheFabonator After you create your AutoNumber column then you can Sort descending and then it should work, like this to get the highest autonumber:

    First(SortByColumns(yourDataSource, "AutoNumberColumn", SortOrder.Descending))
    

     See if it helps @TheFabonator 

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 739 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 268

Last 30 days Overall leaderboard