Calculating length in a function in a runtime object

Hi, i wanted to have the field length of phone to be able to create some validations and UI effects.

I put the phone length field as a runtime property on the customer runtime object. But when I type a phone number in the UI it seems like the function is lagging behind and are not able to calculcate on the latest version of the phone field state.

On the pictures below you see that the function returns 4 while the length is 8

Hi,

Have you databound the self property for “phone” in the function for calculating the length of the phone number?

// Erik

I have changed it now, but I belive I did not pick from the self list, but selected the same field in the runtime object list

If that is the case, then the behavior is expected. Those props have a reference to the old value, while self values have a reference to the new value.

// Erik

That’s nice to know, thanks :slight_smile: