Thank you Anders for your help!
The second option was closer to what I was looking for. I have also combined that with one of your scripts (How to detect an update/change of a number? - #4 by kaspar-ehrhardt) that I found in the forum and now it works perfectly!
Again thank you for your effort and your time!
example.gh (74.2 KB)