Updating the value shown in the Numeric entry field without directly binding value property to a tag

Hello everyone,

I have made a "template view" with a numeric entry field that opens a confirmation popup when the user edits the value in it. On confirmation, the value is written to a tag. I am using this "template view" as an embedded view in other views.

I want the numeric entry field to always display the value of the tag but the problem that I am facing is that the field gets reset to the value in the base view every time I launch a session or navigate between pages.

How do I make sure that the number in the numeric entry field is always showing the current tag value?

I would probably set it up like this:

  • On the template view create params.tagPath.
  • On the template view bind the numeric entry field value to the tag specified in params.tagPath.
  • Pass in the tagPath on every instance of your template.

I already have a tagPath parameter that sends the path to the popup so that it knows what to update.

Thanks for the quick reply!
Wouldn't it automatically update the tag with the inputted value if i bind it to the value property of the numeric entry field?
Right now the tag is updating via script if the confirmation button is pressed in the popup. I want to update the tag only on when the confirmation button is pressed in the popup.

Use the tagpath supplied to the popup view to perform an indirect tag binding to a custom property. Then, use a uni-directional binding to connect the numeric entry field to the custom property. Then your entry field won't write back to the tag. Your confirm button would write the entry field's value to the tag, either with system.tag.writeBlocking(), or, if you made the indirect binding bidirectional, it could simply write to the custom prop. (Letting that binding propagate the write.)

Thank you!
I got it to work :slight_smile: