{
  "eventsAndFunctions": [
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "Set",
            "expression": "ExtCommonBusiness.ListBusinessSegments({})",
            "variableName": "bussSgms"
          },
          {
            "command": "WriteModel",
            "expression": "^bussSgms",
            "modelVariableName": "bussSgms"
          },
          {
            "command": "Load",
            "expression": "Select(^bussSgms, [code, name])",
            "widgetName": "cboChannels"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "bussSgms",
            "type": "list(ExtCommonBusiness.BusinessSegment)"
          }
        ]
      },
      "name": "main_init"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "bussSgms",
            "variableName": "bussSgms"
          },
          {
            "children": [
              {
                "command": "GetValue",
                "variableName": "bussSgmId",
                "widgetName": "cboBussSgms"
              },
              {
                "command": "Set",
                "expression": "FindFirst(^bussSgms, id == ^bussSgmId)",
                "variableName": "bussSgm"
              },
              {
                "children": [
                  {
                    "command": "WriteModel",
                    "expression": "{ type: \"BusinessSegment\", id: ^bussSgm.id, name: ^bussSgm.name }",
                    "modelVariableName": "bussSgm"
                  }
                ],
                "command": "If",
                "expression": "!IsNull(^bussSgm)"
              }
            ],
            "command": "If",
            "expression": "!IsNull(^bussSgms)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "bussSgmId",
            "type": "string"
          },
          {
            "name": "bussSgm",
            "type": "ExtCommonBusiness.BusinessSegment"
          },
          {
            "name": "bussSgms",
            "type": "list(ExtCommonBusiness.BusinessSegment)"
          }
        ]
      },
      "name": "main_submit"
    }
  ],
  "model": [
    {
      "name": "bussSgm",
      "required": false,
      "type": "ExtCommonBusiness.Reference"
    },
    {
      "name": "bussSgms",
      "required": false,
      "type": "list(ExtCommonBusiness.BusinessSegment)"
    }
  ],
  "root": {
    "children": [
      {
        "children": [
          {
            "children": [
              {
                "dataFormat": "KeyValueList",
                "label": "[[BusinessSegments]]",
                "last": true,
                "mandatory": true,
                "name": "cboBussSgms",
                "size": 2,
                "widget": "ComboBox"
              }
            ],
            "cssClass": "blz-area-default",
            "layout": "form"
          }
        ],
        "layout": "fit"
      }
    ],
    "layout": "responsive"
  },
  "routing": null,
  "unused": []
}