Skip to content

gw_fct_setselectors

edgarfuste edited this page Jun 1, 2022 · 3 revisions

Description

Function that manages selectors.

Input example

SELECT gw_fct_setselectors($${"client":{"device":4, "infoType":1, "lang":"ES", "cur_user":"test_user"}, 
"form":{}, "feature":{}, 
"data":{"filterFields":{}, "pageInfo":{}, "selectorType":"selector_basic", "tabName":"tab_exploitation", 
"id":"1", "isAlone":"True", "value":"True", "addSchema":"NULL"}}$$);

Common input parameters: (client, form, feature)

Specific input parameters: (data)
We always work with names as much autodocumented as possible. If you feel some else please request it to [email protected].

Common output parameters: (status, message, version)

Specific output parameters: (body)
We always work with names as much autodocumented as possible. If you feel some else please request it to [email protected].

Output example

{
  "status": "Accepted",
  "version": {
    "value": "3.4.021"
  },
  "body": {
    "message": {
      "level": 1,
      "text": "Process done successfully"
    },
    "form": {
      "formName": "",
      "formLabel": "",
      "currentTab": "tab_exploitation",
      "formText": "",
      "formTabs": [
        {
          "fields": [
            {
              "expl_id": 1,
              "label": "1 - expl_01",
              "widgetname": "1",
              "columnname": "expl_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "expl_id": 2,
              "label": "2 - expl_02",
              "widgetname": "2",
              "columnname": "expl_id",
              "type": "check",
              "dataType": "boolean",
              "value": false
            }
          ],
          "tabName": "tab_exploitation",
          "tableName": "selector_expl",
          "tabLabel": "Expl",
          "tooltip": "Active exploitation",
          "selectorType": "selector_basic",
          "manageAll": "true",
          "typeaheadFilter": " AND lower(concat(expl_id, ' - ', name))",
          "selectionMode": "keepPreviousUsingShift"
        },
        {
          "fields": [
            {
              "id": 0,
              "label": "0 - OBSOLETE",
              "widgetname": "0",
              "columnname": "state_id",
              "type": "check",
              "dataType": "boolean",
              "value": false
            },
            {
              "id": 1,
              "label": "1 - ON_SERVICE",
              "widgetname": "1",
              "columnname": "state_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "id": 2,
              "label": "2 - PLANIFIED",
              "widgetname": "2",
              "columnname": "state_id",
              "type": "check",
              "dataType": "boolean",
              "value": false
            }
          ],
          "tabName": "tab_network_state",
          "tableName": "selector_state",
          "tabLabel": "State",
          "tooltip": "Network",
          "selectorType": "selector_basic",
          "manageAll": "false",
          "selectionMode": "keepPrevious"
        },
        {
          "fields": [
            {
              "id": 0,
              "label": "0 - STATE0",
              "widgetname": "0",
              "columnname": "state_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "id": 1,
              "label": "1 - STATE1",
              "widgetname": "1",
              "columnname": "state_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "id": 2,
              "label": "2 - STATE2",
              "widgetname": "2",
              "columnname": "state_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "id": 3,
              "label": "3 - STATE3",
              "widgetname": "3",
              "columnname": "state_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "id": 4,
              "label": "4 - STATE4",
              "widgetname": "4",
              "columnname": "state_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            }
          ],
          "tabName": "tab_hydro_state",
          "tableName": "selector_hydrometer",
          "tabLabel": "Hydrometer",
          "tooltip": "Hydrometer",
          "selectorType": "selector_basic",
          "manageAll": "true",
          "selectionMode": "keepPrevious"
        },
        {
          "fields": [
            {
              "psector_id": 1,
              "label": "1 - Masterplan 01",
              "widgetname": "1",
              "columnname": "psector_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "psector_id": 2,
              "label": "2 - Masterplan 02",
              "widgetname": "2",
              "columnname": "psector_id",
              "type": "check",
              "dataType": "boolean",
              "value": false
            }
          ],
          "tabName": "tab_psector",
          "tableName": "selector_psector",
          "tabLabel": "Psector",
          "tooltip": "Psector",
          "selectorType": "selector_basic",
          "manageAll": "true",
          "typeaheadFilter": " AND lower(concat(expl_id, ' - ', name))",
          "selectionMode": "keepPrevious"
        },
        {
          "fields": [
            {
              "sector_id": 1,
              "label": "1 - sector1-1s",
              "widgetname": "1",
              "columnname": "sector_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "sector_id": 2,
              "label": "2 - sector1-2s",
              "widgetname": "2",
              "columnname": "sector_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "sector_id": 3,
              "label": "3 - sector1-1d",
              "widgetname": "3",
              "columnname": "sector_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "sector_id": 4,
              "label": "4 - sector2-1s",
              "widgetname": "4",
              "columnname": "sector_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            },
            {
              "sector_id": 5,
              "label": "5 - sector2-1d",
              "widgetname": "5",
              "columnname": "sector_id",
              "type": "check",
              "dataType": "boolean",
              "value": true
            }
          ],
          "tabName": "tab_sector",
          "tableName": "selector_sector",
          "tabLabel": "Sector",
          "tooltip": "Sector",
          "selectorType": "selector_basic",
          "manageAll": "true",
          "selectionMode": "keepPrevious"
        }
      ]
    },
    "feature": {},
    "data": {
      "geometry": {
        "x1": 418835.71,
        "y1": 4576193.42,
        "x2": 419568.98,
        "y2": 4576950.72
      }
    }
  }
}
Clone this wiki locally