This function can generate running number ID
As of r338, Functions is in Production Early Access. To request access, contact your Customer Success manager.
Read more in the Community thread here.
Create ID with sequential number is set up for the Common Data Model's Action table. If you would like to use this for a different table, you have to set up a Tulip Table Connector for that specific table.

Introduction
Functions allow your team to build shared or standardized logic once, and then reuse in multiple apps. In this example we are showcasing functions which can bulk update the status field in multiple work orders.
Function Flow
The function's flow:

Walkthrough
Functions are triggered by a trigger in an application. In the function, you can define inputs that need to be provided by the trigger that calls the function.
In this specific function, we require two inputs.

Also, this function has an output which can be used in the application.

The first input is Prefix variable, and the second is a Length variable.
These two variables are provided to the function call by the trigger. The function uses these inputs to execute.

First, the function is called by a trigger. The first action after the function is called is to generate a 20-character long ID placeholder, which corresponds to the length of an SAP ID. If your operation uses longer IDs, you can modify this ID placeholder to match your requirements.

Next, the function uses a connector function to retrieve the last ID with the specified prefix from the table it is configured for.

After the function retrieves the last ID, it checks whether it exists or not.

If the ID doesn't exist, it will generate a new ID.
To generate a new ID, the first step is to set the ID length to match the value provided by the "Length of ID" input.

The second step is generating the actual ID. The action uses the provided prefix, the newly specified ID length, and increments the number by one.

If the retrieved last ID exists, the function will check the length of the ID (excluding the prefix).

Next, the function checks whether the second input, the "Length of ID" number input, is empty.

If it is empty, it means that the user only wants to increment the number of the existing ID. To do this, they first need to extract the number from the ID.

Next, the function increases the previously retrieved number by 1.

Lastly, it generates the new ID.

If the Length of ID input wasn't empty the function exames whether the Length of ID is the same length as the Last ID's length.

If it is, then again, it won’t generate a new ID, but will only increment the existing one by 1. The function will extract the ID number in the same way as when the "Length of ID" input is empty, increment it by 1, and generate a new ID.
If the Length of ID is not the same as the Last ID's length the function will generate a new ID. To do so, the first step is to set the ID length to match the value provided by the "Length of ID" input.

The second step is generating the actual ID. The action uses the provided prefix, the newly specified ID length, and increments the number by one.

At the end of the function, a new ID variable is generated as the function’s output. This can be used in the
{height="" width=""}application as the ID for a new table record.
Further Reading
If you would like to get to know more functions, check out these other documents to extend your knowledge