Property Change on window load filter

Hello,
I've read other posts about this issue but cant find the answer I'm after.
I have a string entry that is apart of two separate templates. It binds to a tag that labels that batch number of a tank. I want to store that batch number along with a few other pieces into our data base which I can do successfully. The problem is when the screen is loaded it writes every time the screen is loaded. I'm using the property change "text". I cannot use no value to filter it because they are often left empty waiting for a new batch. How would I filter out the initial load of the screen.

The technique I use is at least one extra property on each entry field, typically named "raw", that has the actual binding to the source data. Then the actual value property of the input ("text" or "intValue" or whatever) would have a unidirectional property binding to the raw custom property.

The change script looking at the value property would check if the new value matches the raw value, and proceed only if different. This ensures data arriving on window load doesn't fire your script.

2 Likes