Block - Reset Document ID every month

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

  1. Create a Running Number Module and configure the form design as below

Information:

  • Name: Helpdesk
  • Last Date
  • Last Number

Module B - Helpdesk

  1. I want the automation to trigger when creating a helpdesk. So I have to do automation at Create.

  2. Helpdesk > Basic: Create > Automation
    When performing Create, do Automation

  3. Before executing

  1. Drag &drop Action block: Select ‘Find’
    Module: Running Number
    Filter: Choose ‘Name’ is Helpdesk
    Hint: To find the running number based on the name

image

  1. 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

  1. If True:

  2. Drag & drop Action block: Select ‘Set’
    Variable: #Running Number Found#Last Number
    Value: 0

  3. Click + Add Action

  1. 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

  2. Click + Add Action

  1. Select 'Set’
    Variable: #Form#RunningNumber
    Value: #Running Number Edit Submission#Last Number +1

  2. If False:

  1. 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

  2. Click + Add Action

  1. Select 'Set’
    Variable: #Form#RunningNumber
    Value: #Running Number Edit Submission#Last Number +1

#automation #block

1 Like