1. Help Center
  2. HubSpot Micro Apps
  3. Workflow Generate Code Actions

What does the 'Clear an Incremental Value/Code' action do?

The 'Clear an Incremental Value/Code' action within the Generate Code Actions app by Integration Glue allows you to reset or clear the incremental value or code stored in a specified HubSpot property. This action is useful for managing sequences of values or codes that need to be restarted or cleared for new use cases.

The action removes the current value saved in the designated property, effectively resetting the incremental sequence. Once cleared, the next time the 'Generate an Incremental Value/Code' action runs, it will either start from the default value (if set) or any other value you define, beginning the sequence anew.

This action is particularly useful when:

  • You need to reset counters or codes after a certain period (e.g., yearly reset for order numbers or reference codes).
  • You are completing a cycle in your workflow and want to start fresh with new incremental values.
  • You need to clear values to ensure that new records or processes begin with a clean slate, preventing errors or mismatches in sequential codes.

 

Screenshot 2025-01-15 142847

  • Property containing incremental value/code refers to the HubSpot property where the incremental value or code is stored. It is the field that holds the current value or code, which will be cleared when the action is triggered.

 

Here’s a step-by-step guide to setting up the 'Clear an Incremental Value/Code' action in the Generate Code Actions app by Integration Glue:


Step 1: Add the Action to the Workflow

  • Open your HubSpot workflow editor.
  • Click the "+" button to add a new action.
  • From the available app actions, select Generate Code Actions and choose 'Clear an Incremental Value/Code'.

Step 2: Select the Property Containing the Incremental Value/Code

  • Title: Choose the Property for the Incremental Value/Code
  • In the action setup panel, locate the 'Property containing incremental value/code' field.
  • Select the HubSpot property where the incremental value or code is stored. This could be a property like Order Number, Ticket ID, or any custom property where you're tracking the incremental value.

Step 3: Save and Test the Workflow

  • Once the action is configured, click Save to finalize the setup.
  • To test the workflow:
    • Trigger the workflow to ensure the incremental value/code is cleared from the selected property.
    • Check that the value in the property is removed (reset to null/empty), and when the next 'Generate an Incremental Value/Code' action runs, it starts from the default value or the value you set for the next code.