I have multiple fields to fill with a scaled value. only populate selected field, one at a time

I have ignition 7.9 , I have a TCP scale which I created two tags from it.
1- ScaleValue
2 - ScaleStable (meaning the value is not changing )

Operator is supposed to weight multiple units of packages per hour in a way to control the fill volume. then puts the weight on a paper form putting the weight for each package weighted. what we want is to eliminate the paper, and also the human error of putting a wrong number. so ideally the operator would click on the table cell(text box, numeric textbox, anything would work) and the value would be put automatically. I know i can probably due this with a push button to force the value to the cell where the cursor is. but i would like to do it automatically . so if for example I have a form with 4 input boxes. put the value of the scale( tag) only when selected. if operator selects next box then put the value on the next one.

Instead of an input box then, I would use a label with an on click action to write the scale value to it. If you need to also edit it, use system.gui.showNumericKeypad

thanks, label is also fine. but i won’t have just one label, i have more than 10 per form. that is why I wanted to force the value to the selected one only. and leave there rest with whatever value was there. so only update the one selected.

I went ahead and did the following. I’m sure that there is a better way but this works.

I added a custom property onfocus(bool) which I set to 1 when focusGained and to 0 on focusLost
I also have a property scalevalue and scalestable, both coming from the scale.

then in the PropertyChange i put this script

onfocus=event.source.onfocus
if onfocus==1:
	value = event.source.scalevalue
    scalestable=event.source.scalestable
    counter=0
    while scalestable==1 and counter<1000:
		event.source.doubleValue = value
		counter +=1

this way it only updates while in focus.