Well, your code sure looks like beginners work and it is ever worse to leave it to another beginner to clean it up a bit ;-). Don't despair, you'll quickly get the hang of it!
The "value write" at the beginning clears the entry box in case there are some leftovers in it from an earlier run.
The entire diagram is overly complicated, e.g. the feedback node is a kludge to fix a wiring loop that would otherwise break the code. Also there is no time control in the loop. Basically, it checks the input and rewrites the property nodes inside the loop as fast as the machine can handle it (thousands of times per second), bogging down everything else. Personally, I also don't like the hiding of the control. If it should not be changed later, disable it. It
is nice if the operator can check the serial number even at a later point in time.
Think about the task as you would explain it to someone, it is much simpler that your code would suggest:
(1) Check the entry field until the length is four.
(2) Once this happens, verify input with popup.
I would use a simple event structure as in the attached example. Modify as needed. You might add some extra input checking, e.g. remove leading and trailing spaces and check for disallowed characters.