# MappView: Acessing widgets via key intermittently does not work

**URL:** <https://community.br-automation.com/t/mappview-acessing-widgets-via-key-intermittently-does-not-work/12998>\
**Category:** HMI & Visualization\
**Created:** [October 14, 2026, 8:21pm UTC](https://community.br-automation.com/t/mappview-acessing-widgets-via-key-intermittently-does-not-work/12998 "2026-10-14T20:21:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Lui](https://avatars.discourse-cdn.com/v4/letter/j/FF8800/32.png) [@Jonathan\_Lui](https://community.br-automation.com/u/Jonathan_Lui)\
**Post date:** [October 14, 2026, 8:21pm UTC](https://community.br-automation.com/t/mappview-acessing-widgets-via-key-intermittently-does-not-work/12998/1 "2026-10-14T20:21:36Z")

</div>

AS 6.7.0, MappView 6.5.0

In my eventscript, I am accessing the widgets of a content using the format `widget["NameOfWidget"]`. This has caused me no issue with the majority of my contents and scripts until this point (several dozen), but I am now having an issue where the widget cannot be accessed. It is correctly defined in the `*.content` file which loads as expected. However, the eventscript fails to access it. Specifically, the line of code is:

`widgets[`NmiDwellTime${i}`].setVisible(visible);`

and the error is:

`Uncaught (in promise) TypeError: can't access property "setVisible", t[("NmiDwellTime" + (intermediate value))] is undefined`

Both `i` and `visible` are valid here.

To troubleshoot, I wrote out the contents of the widget collection to the console (`console.log(Object.keys(widgets);`) and this confirms that the name of my widget (`NmiDwellTime2`) is **not** present.

I am not sure where to go from here. I tested across a few setups:  
Win11 Firefox v158.0 - doesn’t work  
Win11 Edge v155.0 - works  
Win11 Chrome v155.0 - works  
B&R Linux 12 Chromium v133.0 - works

As mentioned, I have many other contents and scripts that I use this method across, and I’m not sure why this specific content and script are having issues on Firefox. I also did a quick check and another (functioning) content has more widgets, so it doesn’t appear to be related to number.

Thoughts are appreciated.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lui](https://avatars.discourse-cdn.com/v4/letter/j/FF8800/32.png) [@Jonathan\_Lui](https://community.br-automation.com/u/Jonathan_Lui)\
**Post date:** [October 14, 2026, 9:02pm UTC](https://community.br-automation.com/t/mappview-acessing-widgets-via-key-intermittently-does-not-work/12998/2 "2026-10-14T21:02:16Z")

</div>

Well, it seems to work now. I didn’t do anything in particular to address it, I just kept writing code assuming it would work eventually, and it does now. I suppose it was a weird fluke.
