cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Using Autonumbers in Forms

I am just starting out using powerapps and wanted to build an app using the CDS. In doing so I wanted my primary field to unique and I discovered the handy Autonumber feature of CDS. This was great, but once I went to power apps and submitted the form with my new record it gave me errors. It appears that posting the record through powerapps is not generating the next sequence of autonumber. Is there a work around for this. Attached is a simple table and form showing my problem.

PS.  Also does anyone know why CDS creates (base) fields for currency?

 

CDS Entity Definiton and Autonumber field (Primary)CDS Entity Definiton and Autonumber field (Primary)Powerapps Edit FormPowerapps Edit FormError on Submit form  if you do not manually enter PID valueError on Submit form if you do not manually enter PID value

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Using Autonumbers in Forms

Hi @JasonF 

 

That seems your PID field is still required, because a “*” is on the left.

Have you ever clicked "Save Entity" button on the lower right corner after you change the field type to AutoNumber and click "Done" button?

Annotation 2019-10-17 154723.png

If you have done this, you still don't forget to refresh your CDS entity data source, delete the EditForm and re-create one in you PowerApps Studio.

Hope this can help.

Best regards,

Sik

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Using Autonumbers in Forms

Hi @JasonF 

@The auto number is assigned when the form is saved. Try changing the settings so that it is not required.

Highlighted
Community Support
Community Support

Re: Using Autonumbers in Forms

Hi @JasonF 

 

That seems your PID field is still required, because a “*” is on the left.

Have you ever clicked "Save Entity" button on the lower right corner after you change the field type to AutoNumber and click "Done" button?

Annotation 2019-10-17 154723.png

If you have done this, you still don't forget to refresh your CDS entity data source, delete the EditForm and re-create one in you PowerApps Studio.

Hope this can help.

Best regards,

Sik

View solution in original post

Highlighted
Helper III
Helper III

Re: Using Autonumbers in Forms

Thanks v-silky-msft,

It was not the entity not being saced properly, it was the form. I had to delete the datasource from the form and re-attach it. This cause the form to redefine itself and everything worked.

 

Regards,

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (1,705)