@numerical-type: bind

How can the numerical type of a node that can contain different units be changed using
@numerical-type: bind
See below, The node '[‘prijs/bewerking’ and ‘aantal’ depends on node ‘eenheid’ and can be in pieces, meter or square meters

	'type bewerking': text  -> ^ ^ >'model'.'Bewerkingen'[]
	'eenheid': text //per meter, m^2 or stuks
	'prijs/bewerking': number 'euro' = >'type bewerking'.'prijs'
	'aantal': number 'aantal'
	'Prijs': number 'euro'= from 'euro' product ( .'aantal' as 'aantal' , .'prijs/bewerking' )

This is an example of how you can use bind for a user provided numerical type and number of decimals in the webclient:

root {
	'Units': collection ['Unit'] {
		'Unit': text
		'Decimals': number 'count'
	'Item': collection ['K'] {
		'K': text
		'Unit': text -> ^ .'Units'[]
		'Amount': number 'unit'
			@numerical-type: >'Unit' // e.g. m^2 or meters or pieces

	'unit' @numerical-type: bind .'Units'* as $ (
		label: $ .'Unit'
		decimals: $ .'Decimals'

This way, the webclient will show whatever value the user provides for the Unit as the numerical type for Amount.