cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mjx
Frequent Visitor

How can I get inserted id of common data service table after form submitted through powerapps

I have a canvas app and the forms are populated from common data service, how can I get inserted id of common data service table and once I get the inserted Id I need to add records to second table which is many to many relationship with first table. 

 

onSuccess of form I tried the following code but it does not show the ID or guide

 

          Form1.LastSubmit

 

 

4 REPLIES 4
v-siky-msft
Community Support
Community Support

Hi @mjx ,

 

Please try to use Form1.LastSubmit.GUIDField to obtain the GUID from the record submitted just now. In addition, I would 

Note: Don't use ResetForm() function, it cleans up the form, and Form1.LastSubmit would return blank.

Hope this helps.

Sik

mjx
Frequent Visitor

When I type  Form1.LastSubmit.Guid there is no guid field and there is no ID field. it shows other fields. do you know what is the primary key in a common data service table ? or how can I enable it to show in the column list, views, forms ?

v-siky-msft
Community Support
Community Support

Hi @mjx ,

 

You can go to CDS/Dateverse Table to find the GUID field which data type is Unique Identifier. For example:

Snipaste_2020-11-27_09-47-51.png

Hope this helps.

Sik

 

mjx
Frequent Visitor

In my tables I don't see Unique Identifier, my tables are custom tables not existing tables.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,429)