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:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,449 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,449 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

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 Pages

#1
DP_Prabh Profile Picture

DP_Prabh 51

#2
rezarizvii Profile Picture

rezarizvii 35

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 33 Most Valuable Professional

Last 30 days Overall leaderboard