Auto-generating unique sequential IDs

If you have to use an auto-generated sequential Id for any of your app fields like Employee ID, Vendor ID, Customer ID, Invoice ID etc, you can use the Clappia block named Unique ID

An example use case – You are creating a Clappia App to maintain the data of all your employees and you want to assign a unique and sequential Id to all the employees (maybe with a prefix like your Company Code), you could use this block with parameters like Prefix (say CLP), a Starting Value (say 1001), a Minimum Length of the ID (say 8). Then auto-generated employee Ids will be CLP001001, CLP001002, CLP001003 and so on.

Follow these steps to use the Unique ID Block.

  • Login to your Clappia account.
  • Open the app in which you wish to use the auto-generated sequential Id.
  • Go to the Edit Mode of this app.
  • Drag the block named Unique ID to the left.
  • You will see a new Input Field labelled Unique Sequential ID. Click on the edit icon next to this field.
  • You will see a popover with following inputs. Fill all these inputs and close the popover.
    • Label: Enter a label for this field which will be visible to the end-user.
    • Prefix: Optional. You can set an alpha-numeric code here which will be prefixed to all the auto-generated Ids. If you leave it empty, no prefix will be generated.
    • Minimum Length: Optional. The generated Id will be padded with leading Zeroes to ensure that the length of the auto-generated Id is greater than or equal to this minimum length.
    • Starting Sequence Number: Optional. If you want to first Id in the sequence to start from a number other than 1, you can set a starting number here.
  • Go to App Home to see how the app will appear to the end-user.
  • Enter some data for the first employee and Submit.
  • A new entry will be created with a Reference ID. Go to View Submissions.
  • You will see one submission with an auto-generated Employee ID.

Related Articles