Document Number Generation in SharePoint

Dieser Inhalt ist in Ihrer Sprache nicht verfügbar.

Vitextra Number Generator makes it possible to automatically generate numbers or names in the SharePoint document library or list.

📝 Note
Number Generator supports specific column types such as ID, Lookup as well as custom types.

Precondition

To set up and use formulas, make sure the Vitextra: Number Generator feature is activated on the site collection.

Go to Site Settings and click Site collection feature:

Site settings

Site settings

Scroll down to the feature and select Activate if it is not activated yet:

Number Generator site collection feature

Number Generator site collection feature

Numbering Schemes

Column value generation managed by Numbering Schemes defined on list/library level.
Go to list or library settings where you need to apply column auto-population and select Number Generator under General Settings heading:

SharePoint Library settings

SharePoint Library settings

Use this list to manage numbering schemes for the list. Click New Item button to create a new numbering scheme.

SharePoint Library settings

SharePoint Library settings

The numbering scheme form contains the following fields:

  • Name
  • Content Type
  • Field
  • Formula
  • Regenerate

Numbering scheme form

Numbering scheme form

📝 Note
Content type field greyed out in case of content types disabled for the list or document library.

Formula Format

The numbering formula supports three types of data:

  • Text
  • Column
  • Sequence

To reference Column wrap its display or internal name in square brackets:

[Column Name]

To reference Sequence wrap name of the sequence with leading "!" symbol in square brackets:

[!Sequence Name]

All other text in the formula appears as it is in the result.

Sample formula:

ID: [ID]. Created at [Created:MM/dd/yyyy]

Result of the formula above for item created at 4/12/2020 with ID = 1:

ID: 1. Created at 4/12/2000

Samples

For demo purposes, there is a document library that contains custom fields listed below:

  • Product. Single line of text
  • Status. Choice
  • Publish Date. Date and Time
  • Number. Single line of text

Sample formulas will be used to populate Number column in the document library.

Sample #1. Populate column with ID field

The formula of the numbering scheme to populate a column with ID field:

[ID]

Result in the document library:

Sample #1. Result

Sample #1. Result

You can combine many fields to populate column values:

[ID].[Status]

Sample #1. Result

Sample #1. Result

Sample #2. Format Numeric Field

Number Generator supports formatting. To define the field's format, specify it after the colon: [Field:Format]. Supported format specifier:

Format SpecifierNameDescription
0Zero PlaceholderReplaces the zero with the corresponding digit if one is present; otherwise, zero appears in the result string.
#Digit placeholderReplaces the "#" symbol with the corresponding digit if one is present; otherwise, no digit appears in the result string.
.Decimal pointDetermines the location of the decimal separator in the result string.
,Group separatorInserts a localized group separator character between each group.

💡 Tip
See Custom numeric format strings article for more details about the numeric format.

Format column with repeated ID field in different formats:

[ID:0000] - [ID:####] - [ID:##00]

Sample #2. Result

Sample #2. Result

Sample #3. Format Date Field

You can use the same approach for date column formatting.

Format date column (Publish Date), different formats:

[Publish_x0020_Date:MM/dd/yyyy] - [Publish_x0020_Date:yy-MM-dd-HH-mm-ss]

Sample #3. Result

Sample #3. Result

💡 Tip
See Custom date and time format strings article for more details about date format.

Sample #4. Reference Sequence

Number Generator supports cross-site sequences to generate unique numbers. To reference a sequence in a formula, use its name with a leading !:

[!ManualSequence]

Sample #4. Result

Sample #4. Result

Sample #5. Use System Fields

Number Generator allows you to populate column with system fields' values. Some of the system fields are presented in the table below:

FieldDescriptionExamples
File_x0020_TypeExtension of the filedocx, pdf
UniqueIdUnique identifier of the item95fed722-c225-4f02-8c8d-7b0515e0777f
FileSizeDisplaySize of the file616311
ContentVersionVersion of content of the file2
_UIVersionStringVersion of the item15.0
AuthorUsers who created the itemJohn Harrison
EditorUser who last modified the itemHenry McDavid
[Author].[Created:yyyy] v.[_UIVersionString]

Sample #5. Result

Sample #5. Result

Teilen