Component Binding Refresh Component Error

I have some odd behavior with a component and I also don't quite know what terminology to use to describe it. I have a template that takes a path to a tag (UDT) and then indirectly binds to a bunch of stuff within that tag. Nothing weird, done it tons of times.

However, in this case I'm using a dropdown to populate the path, which is working. The issue arises when the dropdown choice is first initialized. I want the dropdown to start by showing "make a selection" - so, null value prop. However, now when the selection is first made and the path is filled in, most of the components show "Component Error" rather than the value that I want displayed. Then, when I make a different selection all of the values populate. It seems like the issue only occurs on that initial null to number transition:

(I've temporarily disabled the visible binding that hides the component when the selection is null)
Null:

0:

1:

0:

I've tried adding a binding refresh on the dropdown's selected path when the value prop changes, and the template's path binding, but no luck:

def valueChanged(self, previousValue, currentValue, origin, missedEvents):
	self.refreshBinding("custom.selected_path")
def valueChanged(self, previousValue, currentValue, origin, missedEvents):
	self.getSibling("Flow_Totals").refreshBinding("props.params.flow_path")
	#self.refreshBinding("custom.selected_path")

Nobody has any ideas on this?

Update:

Hovering over the errored component, I get a popup

Cannot read property 'includes' of null

But the binding is not even "null" anymore - so not sure why it's doing that

I have other embedded views on the same view that are doing this same thing, but they don't exhibit this behavior.

For the time being, as a workaround, I've not allowed a null path to be selected from the dropdown. Instead, if the value is "" (empty string) the embedded view is hidden and the options[0] path is used (to avoid the transition from null to another number).

This would be FAR easier to help with if you provided a project export (at least the relevant Views) and an export of the UDT structure. Without insight into the actual bindings and how everything is built we'd all just be guessing.

As requested:
Proj_2023-08-14_1137.zip (47.1 KB)

**this zip has the changes that I mentioned implemented

That export doesn't contain any information about the UDT structure other than what I could try to extrapolate from how the scripts/bindings reference attributes. Are you able to provide an instance of one of the UDTs in use? The more the better, as there's always the chance one of them has an unexpected shape.

Sorry, that was an oversight. I was focused on the view.

Definition:

{
  "name": "Flow_Total",
  "parameters": {
    "Name_ft": {
      "dataType": "String"
    },
    "Device_ft": {
      "dataType": "String"
    },
    "AOI_Instance_Name_ft": {
      "dataType": "String"
    },
    "Tag_ft": {
      "dataType": "String"
    }
  },
  "tagType": "UdtType",
  "tags": [
    {
      "opcItemPath": {
        "bindType": "parameter",
        "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Month.Flow_Total_Resettable"
      },
      "valueSource": "opc",
      "dataType": "Float8",
      "name": "Month",
      "engUnit": "kGal",
      "tagType": "AtomicTag",
      "opcServer": "Ignition OPC-UA Server"
    },
    {
      "opcItemPath": {
        "bindType": "parameter",
        "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Today.Flow_Total_Resettable"
      },
      "valueSource": "opc",
      "dataType": "Float8",
      "name": "Today",
      "engUnit": "kGal",
      "tagType": "AtomicTag",
      "opcServer": "Ignition OPC-UA Server"
    },
    {
      "opcItemPath": {
        "bindType": "parameter",
        "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}.Flow_Total"
      },
      "valueSource": "opc",
      "dataType": "Float8",
      "name": "Total",
      "engUnit": "kGal",
      "tagType": "AtomicTag",
      "opcServer": "Ignition OPC-UA Server"
    },
    {
      "name": "Display_Config",
      "tagType": "Folder",
      "tags": [
        {
          "valueSource": "memory",
          "dataType": "Boolean",
          "documentation": "Default is kGal. Toggle if measured in MGal.",
          "name": "MGal",
          "value": false,
          "tagType": "AtomicTag"
        }
      ]
    },
    {
      "opcItemPath": {
        "bindType": "parameter",
        "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Year.Flow_Total_Resettable"
      },
      "valueSource": "opc",
      "dataType": "Float8",
      "name": "Year",
      "engUnit": "kGal",
      "tagType": "AtomicTag",
      "opcServer": "Ignition OPC-UA Server"
    },
    {
      "name": "Hist",
      "tagType": "Folder",
      "tags": [
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Month_Prev"
          },
          "valueSource": "opc",
          "dataType": "Float8",
          "name": "Prev_Month",
          "engUnit": "kGal",
          "tagType": "AtomicTag",
          "opcServer": "Ignition OPC-UA Server"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Day_1"
          },
          "valueSource": "opc",
          "dataType": "Float8",
          "name": "Day_1",
          "engUnit": "kGal",
          "tagType": "AtomicTag",
          "opcServer": "Ignition OPC-UA Server"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Day_6"
          },
          "valueSource": "opc",
          "dataType": "Float8",
          "name": "Day_6",
          "engUnit": "kGal",
          "tagType": "AtomicTag",
          "opcServer": "Ignition OPC-UA Server"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Day_5"
          },
          "valueSource": "opc",
          "dataType": "Float8",
          "name": "Day_5",
          "engUnit": "kGal",
          "tagType": "AtomicTag",
          "opcServer": "Ignition OPC-UA Server"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Day_3"
          },
          "valueSource": "opc",
          "dataType": "Float8",
          "name": "Day_3",
          "engUnit": "kGal",
          "tagType": "AtomicTag",
          "opcServer": "Ignition OPC-UA Server"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Day_4"
          },
          "valueSource": "opc",
          "dataType": "Float8",
          "name": "Day_4",
          "engUnit": "kGal",
          "tagType": "AtomicTag",
          "opcServer": "Ignition OPC-UA Server"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Day_2"
          },
          "valueSource": "opc",
          "dataType": "Float8",
          "name": "Day_2",
          "engUnit": "kGal",
          "tagType": "AtomicTag",
          "opcServer": "Ignition OPC-UA Server"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}_Year_Prev"
          },
          "valueSource": "opc",
          "dataType": "Float8",
          "name": "Prev_Year",
          "engUnit": "kGal",
          "tagType": "AtomicTag",
          "opcServer": "Ignition OPC-UA Server"
        }
      ]
    },
    {
      "opcItemPath": {
        "bindType": "parameter",
        "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}.Flow_Total_Resettable"
      },
      "valueSource": "opc",
      "dataType": "Float8",
      "name": "Resettable",
      "engUnit": "kGal",
      "tagType": "AtomicTag",
      "opcServer": "Ignition OPC-UA Server"
    },
    {
      "opcItemPath": {
        "bindType": "parameter",
        "binding": "ns\u003d1;s\u003d[{Device_ft}]{AOI_Instance_Name_ft}.Flow_Reset_PB"
      },
      "valueSource": "opc",
      "dataType": "Boolean",
      "name": "Reset",
      "tagType": "AtomicTag",
      "opcServer": "Ignition OPC-UA Server"
    }
  ]
}

Instances:

{
  "name": "Flow_Totals",
  "tagType": "Folder",
  "tags": [
    {
      "name": "Influent_Flow_Total",
      "typeId": "Flow_Total",
      "parameters": {
        "Name_ft": {
          "dataType": "String",
          "value": "Influent Flow Total"
        },
        "AOI_Instance_Name_ft": {
          "dataType": "String",
          "value": "Influent_Flow_Total"
        },
        "Device_ft": {
          "dataType": "String",
          "value": "HDWK"
        },
        "Tag_ft": {
          "dataType": "String",
          "value": "INF-FIT"
        }
      },
      "tagType": "UdtInstance",
      "tags": [
        {
          "name": "Today",
          "tagType": "AtomicTag"
        },
        {
          "name": "Reset",
          "tagType": "AtomicTag"
        },
        {
          "name": "Total",
          "tagType": "AtomicTag"
        },
        {
          "name": "Hist",
          "tagType": "Folder",
          "tags": [
            {
              "name": "Prev_Month",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_1",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_2",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_6",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_5",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_3",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_4",
              "tagType": "AtomicTag"
            },
            {
              "name": "Prev_Year",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Month",
          "tagType": "AtomicTag"
        },
        {
          "name": "Year",
          "tagType": "AtomicTag"
        },
        {
          "name": "Resettable",
          "tagType": "AtomicTag"
        },
        {
          "name": "Display_Config",
          "tagType": "Folder",
          "tags": [
            {
              "name": "MGal",
              "tagType": "AtomicTag"
            }
          ]
        }
      ]
    },
    {
      "name": "RAS_Flow_Total",
      "typeId": "Flow_Total",
      "parameters": {
        "Name_ft": {
          "dataType": "String",
          "value": "RAS Flow Total"
        },
        "AOI_Instance_Name_ft": {
          "dataType": "String",
          "value": "RAS_Pump_Flow_Total"
        },
        "Device_ft": {
          "dataType": "String",
          "value": "BLWR"
        },
        "Tag_ft": {
          "dataType": "String",
          "value": "RAS-FIT"
        }
      },
      "tagType": "UdtInstance",
      "tags": [
        {
          "name": "Month",
          "tagType": "AtomicTag"
        },
        {
          "name": "Year",
          "tagType": "AtomicTag"
        },
        {
          "name": "Total",
          "tagType": "AtomicTag"
        },
        {
          "name": "Display_Config",
          "tagType": "Folder",
          "tags": [
            {
              "name": "MGal",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Today",
          "tagType": "AtomicTag"
        },
        {
          "name": "Hist",
          "tagType": "Folder",
          "tags": [
            {
              "name": "Prev_Month",
              "tagType": "AtomicTag"
            },
            {
              "name": "Prev_Year",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_5",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_3",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_2",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_4",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_6",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_1",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Reset",
          "tagType": "AtomicTag"
        },
        {
          "name": "Resettable",
          "tagType": "AtomicTag"
        }
      ]
    },
    {
      "name": "WAS_Flow_Total",
      "typeId": "Flow_Total",
      "parameters": {
        "Name_ft": {
          "dataType": "String",
          "value": "WAS Flow Total"
        },
        "AOI_Instance_Name_ft": {
          "dataType": "String",
          "value": "WAS_Pump_Flow_Total"
        },
        "Device_ft": {
          "dataType": "String",
          "value": "SLDS"
        },
        "Tag_ft": {
          "dataType": "String",
          "value": "WAS-FIT1"
        }
      },
      "tagType": "UdtInstance",
      "tags": [
        {
          "name": "Month",
          "tagType": "AtomicTag"
        },
        {
          "name": "Year",
          "tagType": "AtomicTag"
        },
        {
          "name": "Display_Config",
          "tagType": "Folder",
          "tags": [
            {
              "name": "MGal",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Resettable",
          "tagType": "AtomicTag"
        },
        {
          "name": "Hist",
          "tagType": "Folder",
          "tags": [
            {
              "name": "Prev_Year",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_1",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_4",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_2",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_3",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_5",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_6",
              "tagType": "AtomicTag"
            },
            {
              "name": "Prev_Month",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Reset",
          "tagType": "AtomicTag"
        },
        {
          "name": "Total",
          "tagType": "AtomicTag"
        },
        {
          "name": "Today",
          "tagType": "AtomicTag"
        }
      ]
    },
    {
      "name": "Dewatering_Unload_Flow_Total",
      "typeId": "Flow_Total",
      "parameters": {
        "Name_ft": {
          "dataType": "String",
          "value": "Dewatering Unload Flow Total"
        },
        "AOI_Instance_Name_ft": {
          "dataType": "String",
          "value": "Dewatering_Unload_Flow_Total"
        },
        "Device_ft": {
          "dataType": "String",
          "value": "SLDS"
        },
        "Tag_ft": {
          "dataType": "String",
          "value": "DW-FIT"
        }
      },
      "tagType": "UdtInstance",
      "tags": [
        {
          "name": "Display_Config",
          "tagType": "Folder",
          "tags": [
            {
              "name": "MGal",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Total",
          "tagType": "AtomicTag"
        },
        {
          "name": "Today",
          "tagType": "AtomicTag"
        },
        {
          "name": "Reset",
          "tagType": "AtomicTag"
        },
        {
          "name": "Resettable",
          "tagType": "AtomicTag"
        },
        {
          "name": "Hist",
          "tagType": "Folder",
          "tags": [
            {
              "name": "Day_2",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_4",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_6",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_1",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_5",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_3",
              "tagType": "AtomicTag"
            },
            {
              "name": "Prev_Month",
              "tagType": "AtomicTag"
            },
            {
              "name": "Prev_Year",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Year",
          "tagType": "AtomicTag"
        },
        {
          "name": "Month",
          "tagType": "AtomicTag"
        }
      ]
    },
    {
      "name": "NPW_Flow_Total",
      "typeId": "Flow_Total",
      "parameters": {
        "Name_ft": {
          "dataType": "String",
          "value": "NPW Flow Total"
        },
        "AOI_Instance_Name_ft": {
          "dataType": "String",
          "value": "NPW_Pumps_Flow_Total"
        },
        "Device_ft": {
          "dataType": "String",
          "value": "HDWK"
        },
        "Tag_ft": {
          "dataType": "String",
          "value": "NPW-FIT"
        }
      },
      "tagType": "UdtInstance",
      "tags": [
        {
          "name": "Today",
          "tagType": "AtomicTag"
        },
        {
          "name": "Total",
          "tagType": "AtomicTag"
        },
        {
          "name": "Hist",
          "tagType": "Folder",
          "tags": [
            {
              "name": "Prev_Month",
              "tagType": "AtomicTag"
            },
            {
              "name": "Prev_Year",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_2",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_6",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_5",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_3",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_4",
              "tagType": "AtomicTag"
            },
            {
              "name": "Day_1",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Month",
          "tagType": "AtomicTag"
        },
        {
          "name": "Reset",
          "tagType": "AtomicTag"
        },
        {
          "name": "Year",
          "tagType": "AtomicTag"
        },
        {
          "name": "Resettable",
          "tagType": "AtomicTag"
        },
        {
          "name": "Display_Config",
          "tagType": "Folder",
          "tags": [
            {
              "name": "MGal",
              "tagType": "AtomicTag"
            }
          ]
        }
      ]
    },
    {
      "name": "Final_Clarifiers_Flow_Total",
      "typeId": "Flow_Total",
      "parameters": {
        "Name_ft": {
          "dataType": "String",
          "value": "Final Clarifier Effluent Flow Total"
        },
        "Device_ft": {
          "dataType": "String",
          "value": "BLWR"
        },
        "Tag_ft": {
          "dataType": "String",
          "value": "FC-LIT"
        }
      },
      "tagType": "UdtInstance",
      "tags": [
        {
          "name": "Hist",
          "tagType": "Folder",
          "tags": [
            {
              "opcItemPath": {
                "bindType": "parameter",
                "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_PREV_EFFL_FLOW_TOTALS[3]"
              },
              "name": "Day_4",
              "tagType": "AtomicTag"
            },
            {
              "opcItemPath": {
                "bindType": "parameter",
                "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_PREV_EFFL_FLOW_TOTALS[8]"
              },
              "name": "Prev_Year",
              "tagType": "AtomicTag"
            },
            {
              "opcItemPath": {
                "bindType": "parameter",
                "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_PREV_EFFL_FLOW_TOTALS[4]"
              },
              "name": "Day_5",
              "tagType": "AtomicTag"
            },
            {
              "opcItemPath": {
                "bindType": "parameter",
                "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_PREV_EFFL_FLOW_TOTALS[2]"
              },
              "name": "Day_3",
              "tagType": "AtomicTag"
            },
            {
              "opcItemPath": {
                "bindType": "parameter",
                "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_PREV_EFFL_FLOW_TOTALS[0]"
              },
              "name": "Day_1",
              "tagType": "AtomicTag"
            },
            {
              "opcItemPath": {
                "bindType": "parameter",
                "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_PREV_EFFL_FLOW_TOTALS[1]"
              },
              "name": "Day_2",
              "tagType": "AtomicTag"
            },
            {
              "opcItemPath": {
                "bindType": "parameter",
                "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_PREV_EFFL_FLOW_TOTALS[5]"
              },
              "name": "Day_6",
              "tagType": "AtomicTag"
            },
            {
              "opcItemPath": {
                "bindType": "parameter",
                "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_PREV_EFFL_FLOW_TOTALS[7]"
              },
              "name": "Prev_Month",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "name": "Display_Config",
          "tagType": "Folder",
          "tags": [
            {
              "value": true,
              "name": "MGal",
              "tagType": "AtomicTag"
            }
          ]
        },
        {
          "enabled": false,
          "name": "Resettable",
          "tagType": "AtomicTag"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_CURRENT_EFFL_FLOW_TOTALS[0]"
          },
          "name": "Today",
          "tagType": "AtomicTag"
        },
        {
          "enabled": false,
          "name": "Total",
          "tagType": "AtomicTag"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_CURRENT_EFFL_FLOW_TOTALS[1]"
          },
          "name": "Month",
          "tagType": "AtomicTag"
        },
        {
          "opcItemPath": {
            "bindType": "parameter",
            "binding": "ns\u003d1;s\u003d[{Device_ft}]FINAL_CLRFR_CURRENT_EFFL_FLOW_TOTALS[2]"
          },
          "name": "Year",
          "tagType": "AtomicTag"
        },
        {
          "enabled": false,
          "name": "Reset",
          "tagType": "AtomicTag"
        }
      ]
    }
  ]
}