Convert text to number

a collection ‘products’ needs except the ID also an Id-number that is equal to the ID

			'product_ID': text
			'productNr': number 'ID' 

therefore in migration.alan below line is added

'productNr': number = to-number <! !> $ .'product_ID'

when a products needs to be is added however, then ‘productNr’ must be filled, what is not wanted, it should be filled automaticly.
How to get this done?

found work around, no conversion needed.

1 Like

There are multiple ways of achieving an auto-incrementing number. A simple one would be to set @default: auto-increment on the key (text) value