How force value of property to be accept as string for integer value

You could use a property change script:

if (previousValue is None) or (currentValue.value != previousValue.value):
	self.custom.key = str(currentValue.value)

Two things before you do this:

  1. the value comparison is important to prevent infinite loops because previousValue and currentValue will always have different timestamps and so will never be equal, whereas their values could be.
  2. the check against previousValue being None is important because the first time the change event occurs there is no “previous value”.
4 Likes