[bug] viewParams for Perspective Embedding objects do not pass updates when data source changes

Using version 8.1.5

I came across a bug where updating values are not flowing down to the subviews properly.

Below is a description of the configuration:

  • a Memory Tag of type “Document”
  • a timer gateway script that is updating a counter ever second and writing to the memory tag
  • a View using a Flex repeater with a binding from the tag to the “instances” property
  • a transform script generating the structure under “instances” to enumerate the subviews in the Flex Repeater
  • the View also using an embedded view with a binding from the tag to the “viewParams” property
  • a transform script generates the structure under “viewParams” for the subview
  • the subview displays the data through labels bound to the Params

Issues:

  1. In the views from the FlexRepeater, the number associated with a key “01” does not update except when the page is loaded for the first time; even a page refresh does not update the values. NOTE: the number associated with the key “aa” does update with the data source.
  2. On first load of a page, neither of the numbers in view from the EmbeddedView updates.
  3. After refreshing the page, the number associated with key “01” does not update. NOTE: refreshing the page fixes the number associated with key “aa” and it begins updating similar to the flex repeater subview.

Below is a screenshot after First Load showing:

  • the value of the tag
  • the value of the “Instances” property of the flex view
  • the subview from the flexview container
  • the value of the Params property of the Embedded view
    *the subview from the embedded view container

image

Below is a screenshot after refreshing the page:
image

@PGriffith I don’t know if this is somewhat related to this forum post:

Have you tried on a newer version? This sounds like a bug we already fixed, unrelated to the thread you highlighted.

I just repeated on version 8.1.9.

I am seeing the same behavior.

For issue #1, I’m suspecting this has something to do with the key being interpreted as an integer, which the Designer is flagging as an “Invalid Key”

For issue#2, this seems to be a difference between FlexView and EmbeddedView on whether parameters that are changing are flowing properly on first load.

I think I’m seeing a similar issue (#2), the Flex Repeater seems to update fine when there are 1 or 2 instances, but anything greater it will not update the other instances. I’m using the View Parameter change script to update the view based on the instance parameter value. I’m using 8.1.1.
Confirmed by adding a system.perspective.print() in the change script…

I’m using a Tab Container which has a Flex Repeater in it…

Update:
On further testing (in the designer), observed the following:
It SEEMS to update the same # of instances as the last update…so when the Flex Repeater updates if the new # of instances is > last # of instances, only the last # of instances is updated. I also tested going between 1 and 3 instances and noted that if 1 is shown, on update to 3 only 1 (1st instance) is updated, but if there were 3 on update 1 or 3 instances worked fine…

Trying update to 8.1.10…

upgrade fixed it… :wink:

@PGriffith have you been able to replicate the original post?

Could someone who is encountering this supply (all of) the relevant views they are using? This appears to be working for me, but it’s not clear what steps like a transform script generating the structure under “instances” to enumerate the subviews in the Flex Repeater mean because the script was not provided.

@cmallonee Attached is a View and Subview for the FlexRepeater and EmbeddedView components. It also includes a script that is feeding data into a memory tag, which I have being called from a Gateway Timer Event every 1000ms.

If you point your Perspective URL mount point to the FlexView, you should see how the values update or not update for the various configurations of FlexRepeater, EmbeddedView, alpha key and numeric key.

Ignition Views not updating params.zip (4.3 KB)