How to make a unique id (like XX><XX><XXXXX) in KoBoToolbox

Hi
There could be a workaround which relies on use of various functions. From the look of things, you should probably know that concat works perfectly fine as calculation. I would therefore suggest the following steps:

  1. For the first drop down, you must define the values in the choices sheet to be the letters you want for each of the four choices. Let us call this ${Q3}
  2. For the second part, the values should be the letters you want too. Let us call this ${Q2}
  3. The third part, you should create a calculate question with the formula **substr((today()*now()random()100),0,6) Let us call this ${Q3}

For the last part, you now need to create a unique ID which should be a text question but with a calculate option added to it. This you can do in XLS. You will need the formula concat(${Q1},"-",${Q2},"-",${Q3})

This is a sample of the XLS file for doing that TestCalculate.xls (26.5 KB)

The look and feel would be something like this.
image

Create a random generated number with 6 digits, this could be the specific time and date

Hope this helps

Stephane

2 Likes