Weird Tag History Behavior when using input/output parameter in expression

We have noticed some weird behavior where

This is what we have done:

  1. The view has a parameter called "tagpath" and the value is passed into it when the popup is opened.

  1. In the view we have a custom property called "DataArray"

The path in the above DataArray structure is bound with an expression binding using the tagpath parameter and the suffix to reach the member in the UDT that has the tag history enabled (e.g. [default[G20_PI_301/OUT )

We then have a table and a timeseries chart (the problem happens to each component equally the same, however it's easier to see what is happening in the table so I will present that here) that is then doing a tag history binding based on the DataArray structure

In the designer, everything works normally regardless of what changes below, but in the browser, a peculiar issue occurs.

  1. When the tagpath view parameter is set to input or input/output, you can see that the value in the historical query is empty

when the tagpath view parameter is set to output, the values in the historical query work perfectly fine

Does anyone have any idea why this is happening??? I suspect that the historical binding, which refers to the expression binding to a property which includes a parameter is not able to be evaluated (but only in the browser, not the designer) because of a possible race or circular logic condition which is then fixed when the parameter is treated as an output?

What we are basically trying to do is to provide a 10 minute trend in our popup for sensors. How is everyone else passing a partial tagpath to a popup and then generating a trend or table with historical data?

Thanks, Mike

First troubleshooting step with anything related to passing params is toss labels on each layer of the views that links the text to your param so you can visually see its valid along each section. When you get to tiers of embedding and such it's very useful.

Otherwise the first step I'd try to enable polling at a few seconds in your tag history binding. That will tell you if its a race condition related to initial loading since it'll re-poll shortly again after loading.

Hi Nol, thanks for the ideas.

What I ended up doing was re-creating my embedded views and popups. I think the issue was that I was using the same paramater name in my embedded view and then passing that to the popup with a paramater with the same name.

When i changed the embedded view parameter to tagp and in my popup open action to pass that value to tagpath the trends started to work fine. It's a bit strange but it's almost as if there is something in the browser that causes issues when you have parameters with the same name.