Hi there, I will guide how to use an automation block to reset the document Id every month and format the Document ID.
Sample scenario: When creating a new helpdesk, the system should check the last created entry’s month. If new month, the Document ID should reset to 0001.
Module A: Running Number - keeping the last running number and last Help Desk System date
Module B: Helpdesk - to set the running number
Module A - Running Number
- Create a Running Number Module and configure the form design as below
 
Information:
- Name: Helpdesk
 - Last Date
 - Last Number
 
Module B - Helpdesk
- 
I want the automation to trigger when creating a helpdesk. So I have to do automation at Create.
 - 
Helpdesk > Basic: Create > Automation
When performing Create, do Automation - 
Before executing
 
- Drag &drop Action block: Select ‘Find’
Module: Running Number
Filter: Choose ‘Name’ is Helpdesk
Hint: To find the running number based on the name 

- Drag & drop condition block:  #RunningNumberFound#Last Date.Month != #Entry#Created Date.Month
Hint: System to check the Created entry Month and the last Running number Month 
- 
If True:
 - 
Drag & drop Action block: Select ‘Set’
Variable: #Running Number Found#Last Number
Value: 0 - 
Click + Add Action
 
- 
Select: 'Perform’
Module: Running Number
Activity: Edit
Entry: #Running Number Found
Expand Property
Form: Select ‘Last Date’ → #Entry#Created Date
Form: Select ‘Last Number’ → #Running Number Found#Last Number +1 - 
Click + Add Action
 
- 
Select 'Set’
Variable: #Form#RunningNumber
Value: #Running Number Edit Submission#Last Number +1 - 
If False:
 
- 
Drag & drop Action block: Select: 'Perform’
Module: Running Number
Activity: Edit
Entry: #Running Number Found
Expand Property
Form: Select ‘Last Date’ → #Entry#Created Date
Form: Select ‘Last Number’ → #Running Number Found#Last Number +1 - 
Click + Add Action
 
- 
Select 'Set’
Variable: #Form#RunningNumber
Value: #Running Number Edit Submission#Last Number +1 
#automation #block







