Dataport with count = 1



I’ ve a problem creating a data port with count equal to 1; I need only last value for this data port, no logging.
In retention I’ve set count = 1 and duration = infinity, i’ve created a JSON Viwer widget with record editing enabled.
Now I’ve two problems:

  • The widget doesn’t show last value but an old one
  • The widget shows the menu for scrolling through records even if count is set to 1




Hi Giacomo,

Your use of this example widget may be a little outside of its original intended purpose. That widget has a narrow purpose for interacting with data, and for the best results I would recommend creating a custom widget. The JSON Viewer is not robust enough to know the properties of the dataport given to it; You will not be able to get rid of the menu to scroll through multiple entries.

Additionally, what is the value of the refresh timer you have set? You may be updating the value, but the code is never asked to re-execute, and thus still display the old value.

What are you trying to accomplish with the use of this widget? If you can tell me what you are trying to do, I might be able to point you at some other example code, or maybe another widget.



Hi Martin,

I’m trying to make a panel for setting properties of the I/O on my board, base JSON is something like this:


The widget should display two section (digitalInput1 and digitalInput2) with its properties. The user should be able to visualize and modify parameters of each section (state, logic_filter, enabled).

On JSON Viewer i’ve set refresh rate to 10 sec.



Hi Martin,

I’ve written a custom widget, now I’m able to read and write my data port!
Is there something that explain how to create a domain level widget?



Hi @giacomo.pastore,

Glad to hear that your custom widget is doing what you need!

Is there something that explain how to create a domain level widget?

This article is a bit old with respect to the changes we made to the admin interface, but additional details on how to create a Domain Widget are available here:

Let me know if you have questions about how to create a Domain Widget,