Feature Request: Invert Visibility Setting

I would like to suggest a feature and, at the same time, ask if there is interest in the community:
The option to invert the visibility binding in MappView per widget.

Background:
With different machine configurations, the visualization also needs to be different. Some widgets should be visible, while others should be hidden. In our machines, there is one variable that determines the configuration of specific options.

Currently, if I want to set something as invisible when an option is set to “TRUE,” the workflow is not complicated but could be much faster:

  1. Go to the “Visualization Control” task (or a similar task).
  2. Add another variable.
  3. Add a line of code that inverts the value depending on the configuration.
  4. Go to OpcUaMap and find the variable.
  5. Activate it.
  6. Bind it in MappView.

Steps 1–5 could be avoided if there were an option like “Invert Visibility Setting” directly in the widget properties by default.

I understand that there are alternative solutions (event bindings, custom widgets, etc.), but as our number of settings, configurations, and developers increases, we have agreed as a team to use the simplest and quickest method for better understanding.

5 Likes

Hi Björn,

I would really prefer to get this feature too.

Another (not really simple) workaround is to do this with a ListBinding:

  1. Add two Bool-SessionVars (AlwaysTrue and AlwaysFalse)
    1.1 One is true, the other is false
  2. Do a ListBinding:
<Binding mode="oneWay">
	<Source xsi:type="listElement">
		<Selector xsi:type="opcUa" refId="::YourOpcUaVar" attribute="value" />
		<be:List xmlns:be="http://www.br-automation.com/iat2015/bindingListEmbedded/engineering/v2" xsi:type="be:session" attribute="value">				
			<bt:Element index="false" refId="AlwaysTrue" />
			<bt:Default refId="AlwaysFalse" />
		</be:List>
	</Source>
	<Target xsi:type="brease" contentRefId="YourContent" widgetRefId="YourWidget" attribute="visible" />
</Binding>

But it would be much easier to invert the binding visibility!

Maybe this is helpful to you :slight_smile:

Sincerly Simon

1 Like

Hi,

From an application point of view, I completely understand your use case and your thinking. This feature would make development easier for this kind of architecture.

But, now the interesting part, since you started this topic: :slight_smile:

  • I would recommend using the visible property very carefully. The best is to avoid it. Because the fact that a widget is not visible does not mean it is not loaded, etc. Simply put, more widgets mean higher performance requirements for the hardware, especially for the client hardware. So, we always say better is to use e.g. dedicated content for each machine variant and use the container widget and action LoadContent() or LoadContentInArea() methods instead of using the visible property of widgets.

  • You can certainly find a solution with binding and event binding, but you may not be aware of this yet. However, a big innovation is coming soon to mappView, called mapp Script, which will be introduced with version 6.3. With this, you can solve this kind of use case very easily. ValueChange event can trigger your script and it is up to you what you do inside, you can e.g. set/reset visibility of widgets based on any condition. Refer to small sample…

And lastly,

I would like to thank you for opening this topic here at the B&R Community. It’s great to discuss your ideas here because it can start interesting discussions, give you another perspective, and, last but not least, some product owners are tracking discussions in the community, so generally discussions like this can inspire them.

BUT, and this is my last point I have to point out as well :rofl:

B&R has an official process for requesting new features. So, if you need anything and you are sure your feature makes sense, you should follow this process anyway. :woman_student:

I hope my view helped you as well :slight_smile:

3 Likes

Hi Jaroslav,
Thank you for your input.
I’m aware of most of the points you mentioned.
I did not want to start talking about performance issues with MappView. Thats a completely different topic - but you brought it up :wink:
I understand the technical background of HTML5 and the performance issues with the visible property. But to be completely honest, the tool (MappView & Automation Studio) should help make the process easier for us developers. Restrictions are always there but should be kept in the background. I don’t want to struggle with the performance issue for one of the simplest requirements in a visualization: displaying something or not.

We are trying to develop our product in a way that, in 10 or more years, a developer is able to maintain the product and understand how it works as fast as possible, even if they have never worked with it.

Solutions with event bindings, LoadContent, and even the future solution of a script that does something in the background are not solutions that can be understood quickly but instead require relatively in-depth familiarization with the type of implementation. They are also far more difficult to implement and introduce a large number of other possible errors. And I repeat myself: this is an extremely simple function, such as displaying and hiding something—no movement, no huge amount of data.

The ListBinding from Simon is a great idea and understandable for everyone but not as easy as a simple inversion :wink:

2 Likes

That is what I like about the discussion. More views, each of them has cons and pros, and everyone can make the most of it.

I have not had a chance to test the mapp Script yet. But I believe, as far as I know the mapp View team, it will be easy to use and understand. But probably not as straightforward as looking into the properties of a widget. Let’s see. :slight_smile:

1 Like

Interesting discussion—hope you don’t mind me jumping in! I wanted to share an approach I found particularly effective in an older HMI software, Vijeo Designer from Schneider Electric. It had a built-in formula editor for visibility control, allowing direct entry of logical expressions using variables (e.g., NOT X or X AND Y). This eliminated the need for additional variables or scripting for simple conditions.

While JavaScript was available for more complex logic, this feature provided an intuitive and efficient way to manage visibility without extra steps. Here’s a screenshot illustrating the functionality:

Would something like this be feasible within mappView’s roadmap, perhaps alongside the upcoming mapp Script? It is one of the cool features I miss from this platform. I could see it being a really powerful addition!

4 Likes

Hey Jaroslav, could you point me to where I can find the process for requesting new features?

Hi @Frederic_Boyadjian, for this you need to contact the support of your local B&R office. They will provide you with all the necessary information and documents.

1 Like

Hi Björn,
I think this is the perfect use case for Expresions. Expresions are also avaiable in mappView. See the help topic: B&R Online Help

1 Like

As @kovarj wrote, best way for different machines load specific content. We use it also, that we generate *.vis file depending on type of machine and in vis file is only content needed for variant.

1 Like