[BUG] 8.1.0 Perspective - EView with object param not able to read value

If you pass an object to an embedded View, these params can’t be used in the EV; they just use the default values there at save.

I have this View which I embed onto a page:

{
  "custom": {
    "bitAvail": false,
    "btnAvail": true,
    "itemSelected": "BrowseValue [value\u003dnull, info\u003dnull, configVersion\u003d9]"
  },
  "params": {
    "availType": "table",
    "bitAvail": {
      "bit": "",
      "integerAvailTagPath": ""
    },
    "optionLabel": "FS4157",
    "optionValue": 4157,
    "selectTagPath": "",
    "tableAvail": {
      "avail": true
    }
  },
  "propConfig": {
    "custom.bitAvail": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "1": "{view.params.bitAvail.integerAvailTagPath}"
          },
          "tagPath": "{1}"
        },
        "transforms": [
          {
            "expression": "try(getBit({value}, {view.params.bitAvail.bit}), false)",
            "type": "expression"
          }
        ],
        "type": "tag"
      },
      "persistent": true
    },
    "custom.btnAvail": {
      "binding": {
        "config": {
          "expression": "if({view.params.availType} \u003d \u0027bit\u0027\r\n\t,{view.custom.bitAvail}\r\n\t,{view.params.tableAvail.avail}\r\n)"
        },
        "type": "expr"
      },
      "persistent": true
    },
    "custom.itemSelected": {
      "binding": {
        "config": {
          "bidirectional": true,
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "1": "{view.params.selectTagPath}"
          },
          "tagPath": "{1}"
        },
        "type": "tag"
      },
      "persistent": true
    },
    "custom.thisItemSelected": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "1": "{view.params.selectTagPath}"
          },
          "tagPath": "{1}"
        },
        "transforms": [
          {
            "expression": "{value} \u003d {view.params.optionValue}",
            "type": "expression"
          }
        ],
        "type": "tag"
      }
    },
    "params.availType": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.optionLabel": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.optionValue": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.selectTagPath": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 40,
      "width": 100
    }
  },
  "root": {
    "children": [
      {
        "events": {
          "dom": {
            "onClick": {
              "config": {
                "script": "\tself.view.custom.itemSelected \u003d self.view.params.optionValue\n\tsystem.perspective.closePopup(\u0027options-popup\u0027)"
              },
              "scope": "G",
              "type": "script"
            }
          }
        },
        "meta": {
          "name": "Button"
        },
        "position": {
          "basis": "34px",
          "grow": 1
        },
        "propConfig": {
          "props.enabled": {
            "binding": {
              "config": {
                "path": "view.custom.btnAvail"
              },
              "type": "property"
            }
          },
          "props.style.classes": {
            "binding": {
              "config": {
                "path": "view.custom.thisItemSelected"
              },
              "transforms": [
                {
                  "fallback": "",
                  "inputType": "scalar",
                  "mappings": [
                    {
                      "input": false,
                      "output": "Buttons/Body Buttons/Text"
                    },
                    {
                      "input": true,
                      "output": "Buttons/Body Buttons/Text UIElement/MenuSelected"
                    }
                  ],
                  "outputType": "style-list",
                  "type": "map"
                }
              ],
              "type": "property"
            }
          },
          "props.text": {
            "binding": {
              "config": {
                "path": "view.params.optionLabel"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "style": {}
        },
        "type": "ia.input.button"
      },
      {
        "meta": {
          "name": "Icon"
        },
        "position": {
          "basis": "18px",
          "shrink": 0
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "path": "view.params.tableAvail.avail"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "path": "material/insert_emoticon"
        },
        "type": "ia.display.icon"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}

image
Params:
image

The smiley face’s postion.display is bound to the last param in the screenshot (tableAvail.avail), a boolean. If I embed this onto a page and toggle the tableAvail prop, nothing happens. If it do the same in the View itself, it works

It works when I don’t use objects. God damn, spent a day and a half chasing my tail…

{
  "custom": {
    "bitAvail": false,
    "btnAvail": "",
    "itemSelected": "BrowseValue [value\u003dnull, info\u003dnull, configVersion\u003d9]"
  },
  "params": {
    "availType": "table",
    "bitAvail": {
      "bit": "",
      "integerAvailTagPath": ""
    },
    "bitAvail_bit": "",
    "bitAvail_integerAvailTagPath": "",
    "optionLabel": "FS4157",
    "optionValue": 4157,
    "selectTagPath": "",
    "tableAvail": {
      "avail": true
    },
    "tableAvail_avail": ""
  },
  "propConfig": {
    "custom.bitAvail": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "1": "{view.params.bitAvail_integerAvailTagPath}"
          },
          "tagPath": "{1}"
        },
        "transforms": [
          {
            "expression": "try(getBit({value}, {view.params.bitAvail_bit}), false)",
            "type": "expression"
          }
        ],
        "type": "tag"
      },
      "persistent": true
    },
    "custom.btnAvail": {
      "binding": {
        "config": {
          "expression": "if({view.params.availType} \u003d \u0027bit\u0027\r\n\t,{view.custom.bitAvail}\r\n\t,{view.params.tableAvail_avail}\r\n)"
        },
        "type": "expr"
      },
      "persistent": true
    },
    "custom.itemSelected": {
      "binding": {
        "config": {
          "bidirectional": true,
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "1": "{view.params.selectTagPath}"
          },
          "tagPath": "{1}"
        },
        "type": "tag"
      },
      "persistent": true
    },
    "custom.thisItemSelected": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "1": "{view.params.selectTagPath}"
          },
          "tagPath": "{1}"
        },
        "transforms": [
          {
            "expression": "{value} \u003d {view.params.optionValue}",
            "type": "expression"
          }
        ],
        "type": "tag"
      }
    },
    "params.availType": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.bitAvail_bit": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.bitAvail_integerAvailTagPath": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.optionLabel": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.optionValue": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.selectTagPath": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.tableAvail_avail": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 40,
      "width": 100
    }
  },
  "root": {
    "children": [
      {
        "events": {
          "dom": {
            "onClick": {
              "config": {
                "script": "\tself.view.custom.itemSelected \u003d self.view.params.optionValue\n\tsystem.perspective.closePopup(\u0027options-popup\u0027)"
              },
              "scope": "G",
              "type": "script"
            }
          }
        },
        "meta": {
          "name": "Button"
        },
        "position": {
          "basis": "34px",
          "grow": 1
        },
        "propConfig": {
          "props.enabled": {
            "binding": {
              "config": {
                "path": "view.custom.btnAvail"
              },
              "type": "property"
            }
          },
          "props.style.classes": {
            "binding": {
              "config": {
                "path": "view.custom.thisItemSelected"
              },
              "transforms": [
                {
                  "fallback": "",
                  "inputType": "scalar",
                  "mappings": [
                    {
                      "input": false,
                      "output": "Buttons/Body Buttons/Text"
                    },
                    {
                      "input": true,
                      "output": "Buttons/Body Buttons/Text UIElement/MenuSelected"
                    }
                  ],
                  "outputType": "style-list",
                  "type": "map"
                }
              ],
              "type": "property"
            }
          },
          "props.text": {
            "binding": {
              "config": {
                "path": "view.params.optionLabel"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "style": {}
        },
        "type": "ia.input.button"
      },
      {
        "meta": {
          "name": "Icon"
        },
        "position": {
          "basis": "18px",
          "shrink": 0
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "path": "view.params.tableAvail.avail"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "path": "material/insert_emoticon"
        },
        "type": "ia.display.icon"
      },
      {
        "meta": {
          "name": "Icon_0"
        },
        "position": {
          "basis": "18px",
          "shrink": 0
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "path": "view.custom.btnAvail"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "color": "#FA0000",
          "path": "material/insert_emoticon"
        },
        "type": "ia.display.icon"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}

image

I stopped using the objects and used the bottom 3 properties instead and my sanity was regained

Something else is likely happening in your View. I tried this and had no issues using a boolean inside an object param.
BoolInsideObjAsParam.mov.zip (1003.7 KB)

I pasted that json into a new view, then embedded it onto a new View, and this is what I see with params.tableAvail.avail = false (smiley is still displayed). Did you test in 8.1.0?

You’ve right though, I created a new EV and embedded that and it works… hmm

Something is wrong with the View you supplied, but I haven’t been able to identify what. When I attempt to delete some of the custom properties form the view, they begin re-appearing, and claiming Bad_Quality. I created a new View, gave it the same basic setup you have (minus the bindings and custom properties), but with the same params, and when I use my View it works as expected.

My testing was done in a nightly build of 8.1.3.