Checksum for id numbers

Hi,
I need to write a robot to check if id number has a correct checksum.

Id number is in format 9 digits for example: 123456789. First 8 numbers are random and last number is calculated with formula ((1st-digit)*8 + (2nd-digit)*7 + (3rd-digit)*6 + … + (8th-digit)*1)Mod11. If the last numer is different then formula then we get “Wrong id number”.

I was trying to make a data table:
1st column: digits from checked id number
2nd column: fixed number used to multiply
3rd column: formula multiply value from 1st column with value from 2nd column
then Sum up all values from 3rd column and then mod11 results.

I am facing two main problems:

  1. how to put formula in data table (3rd column)
  2. how to combine two data table one with fixed values (2nd column) and other with variables (1st column)

Did any one had similar problem?

My suggestion is use excel for this purpose.

1 Like

There will be few thousands of operations. I wanted to avoid crating additional files.

Hi @piomio

There is no way to put a formula inside a data table, but you can freely assign a value based on a calculation.

The way to do it would be to use a For Each Row activity and assign the calculated value to the four column based on the values in the other three columns.

Thanks for replay.
In the end we solved this problem by invoking short VB.Net code.

1 Like