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

Form GUID creation

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

This is my first portal power app so please bear with me.

 

Scenario:

I have a table which uses GUID as a primary key. Now in portal app I have a form and when a new record is created I want to automatically assign a GUID to it.

Earlier I had a canvas app so I was generating a GUID on submit of the form which used to get saved in the backend.

I want to do the same in portal apps as well.

Kindly help me in getting this.

 

Thanks,

Shreyansh

Categories:
  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    Hi, is there any reason why you would want to generate the GUID yourself? 

    The best practices is not to generate GUIDs manually, unless you really need for very specific scenarios

    The OOB code will leverage the NEWSEQUENTIALID SQL function that will help with indexing and performance

     

    Take a look at these articles for additional info:

    https://community.dynamics.com/crm/b/crminthefield/posts/the-dangers-of-guid-newguid

    https://docs.microsoft.com/en-us/sql/t-sql/functions/newsequentialid-transact-sql?redirectedfrom=MSDN&view=sql-server-ver15

     

  • v-shsi16 Profile Picture
    Microsoft Employee on at

    Thanks Oliver, but I was generating means I was using GUID() function to generate GUID , but that was in CANVAS app. I want the same to be done behind (on select property) a Button in PORTAL POWERAPP

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    Hi, is there any reason why you would want to generate the GUID yourself? 

     

    The best practices is not to generate GUIDs manually.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 35

#2
M Bilal Khan Profile Picture

M Bilal Khan 33

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard