Build a Unique Row ID Automation

Topic

Does your data require sequential batch numbers or perhaps an auto increment attribute? An automation to create unique row IDs can let Honeycode do the work for you. Here's how you can do this.

Say you're taking customers' clothing orders. Your app has two fields: Customer Name and Clothing Order. Each time an order is submitted via the app, a table row is added with the customer name, clothing order and a new unique row ID. Check out the video!


Steps

  1. Build two tables as shown below.

  1. Navigate to Builder > click the [+] sign > click Build your own > select the CustomerOrders table > click + Add objects.

  1. Add a Column List and a Form.

  • For the column list object, select the CustomerOrders table and include the three columns (Unique Row ID, Customer Name, and Order Details). The other tick boxes are optional, but not necessary for this walkthrough. Once you create this, the list will be added to the screen. image

  • Then click on the form object, and select the option that includes the button. And select the CustomerOrders table and include the three columns (Unique Row ID, Customer Name, and Order Details). Once this is created, you will have a form screen. image

  1. Navigate to the CustomerOrders form screen > click the Done button > click Edit automation on the Actions panel.

  1. Delete the contents of the $[Unique Row ID] Take data from box and write =FINDROW(ID_Primary)[ID Primary]+1, and select as a: Value.

2020-07-20_8-45-03-0000

:hammer_and_wrench: Builder tip: You can delete the Unique Row ID and the [$Unique Row ID Content] from the visual editor's Block so your end users don't see these fields.

  1. Click + Add actions > select Overwrite.

  1. Enter =FINDROW(ID_Primary)[ID Primary]+1 in the Take data from box > Enter =FINDROW(ID_Primary)[ID Primary] in the and write to box > select as a: Value.

  1. Click the View app button on the upper right to see your automation in action!

:hammer_and_wrench: Builder tip: You will notice in your ID_Primary table, that it is storing a value to prevent any repeat Unique Row IDs. They way our formulas are written prevents it from having more than one row, as the automation continues to add +1 to the that row and overwrite it's value for each new order.

Was this article helpful?
  • Yes
  • No

0 voters

2 Likes