cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-Number type column

In CDS 1.0 there was an option to make a Auto-Number type column. In the current version 2.0 this is no longer available. I would like to have this option because generating an unique number is functionality which occurs in many business scenarios for instance generating an personel number, a product number and so forth. 

Status: Completed

Hello - this is available now in CDS from the maker portal, you can read more about it here : https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/autonumber-fields

Comments
Level: Powered On

The feature is live! Blog post is available here:

https://powerapps.microsoft.com/en-us/blog/autonumber-fields-are-now-supported-by-the-modern-entity-...

 

Please share any feedback you have! Looking forward to hearing your thoughts.

Level 8

Well done!

Level 8

Bravo!  Saw this pop up yesterday and implemented it on about 8 entities.

I set them up with the following settings:

  • Custom format with the following:  {SEQNUM:7}
  • Seed:  1100000
  • Max length: 7

It seems to behave as expected in the form when creating a new record.  One thing I did notice was that if you go back into the edit the field properties on the entity, it no longer shows my specified Custom format and instead shows "String prefixed number".

Also, a few questions:

  • How is behavior affected if this field is marked as Required?
  • How does auto-numbering behave for bulk data load?
  • If a value is specified by a user through Excel interaction or in a form prior to record creation, then an auto-number is not generated - correct?
  • There doesn't appear to be any enforcement of format or sequence natively - is it assumed that makers will build those rules if they need them?

Thank you for all the work getting this in.

Level: Powered On

A few answers to your questions...

 

  • How is behavior affected if this field is marked as Required? 

Marking an autonumber field as Required will not change the behavior of the platform in automatically generating a value for the record at creation time.

However, remember that autonumber fields can always be updated manually by users (they aren’t read-only fields). Marking the field as Required would prevent users from being able to simply clear out the value and leave it blank.

Additionally, there are some known issues with autonumber fields marked as Required in Canvas apps. When fields marked as Required are used in a Canvas form, the user is forced to enter a value for them before saving. If this field is an autonumber field, the user-entered value superceedes the value that is auto-generated by the platform. We are working on improving autonumber support in the Canvas side of things, and more updates should be coming soon.

 

  • How does auto-numbering behave for bulk data load?

Not sure if I understand your question here. The sequential portion of an autonumber field should increment for each data row, depending on the order in which it is received. 

 

  • If a value is specified by a user through Excel interaction or in a form prior to record creation, then an auto-number is not generated - correct?

That is correct. The user-entered value superceedes the one generated by the platform.

 

  • There doesn't appear to be any enforcement of format or sequence natively - is it assumed that makers will build those rules if they need them?

That is correct. We are hoping to add more native support for autonumber fields in Canvas apps soon, and this is something we will consider.

Level 8

Thank you for the timely and complete response!

PowerApps Staff
Status changed to: Completed

Hello - this is available now in CDS from the maker portal, you can read more about it here : https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/autonumber-fields