Perspective Parameter to embedded view somethimes not loaded

Perspective Parameter to embedded view sometimes not loaded.

I have a button with several parameters which i use as an embedded view on several views. This button then writes a value in the PLC based on these parameters via a script.

I noticed that sometimes the buttons do not work. Refreshing the page solves that issue for a while. But it popups again after a while on random buttons.

I noticed that the parameters are not always loaded completely. I think it is only when the parameter is linked via a binding.

I used the parameter as text on the button to see if it has the desired value. But this shows ‘null’ as seen in the screenshot.

Can I solve this issue because it is a big problem in my current project.
Most of the time, it is all fine and it does what it must be. I can replicate the issue if I reload my page 10, i at least have this issue once on a button.

Button text when it is broken, this text is a binding to the parameter with the issue:
image

Binding of the parameter to the button:

Print result of the write script:

Based on your second image, the items are all static strings, so why even use an expression?

Something that might help, select each item in params.ArrTag_To_Write, right click, and check the box that says persistent. This will make it load in with the value it had in the designer.

Also, how many levels deep are you with embedding(view in a view in a view)? I remember that issues start appearing at 4 or 5 levels deep of embedding and passing parameters through that chain.

1 Like

I simplified the exprssion to show that the issue is not linked to a too compicated binding.

I Will try the persistent option. Thank you for that.

About the levels, it is Just a process screen with an embedded view on. In that embedded view I have the button component.

It might be that I have other views on the process display with more levels, can that Also affect my button which 'Follows the rules.'?

To my knowledge, it would only affect buttons in those deeper nested views, it shouldn't affect other views on the same page

The persistent option solved the issue.

If you add a binding to the parameter, the designer automatically changes the setting to persistent disabled.

If I enable it, the issue doesn’t shows up.

But do you risk having a wrong value as parameter this way? So that if you page loads, the parameter doesn’t come from the binding, but from the original value of the designer?

1 Like