cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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

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 ?

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

 

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

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (101,185)