gw_fct_getvisit - Giswater/giswater_dbmodel GitHub Wiki


Description

Function that returns the visit form for the selected visit class, related to the selected feature, with all the fields definition set on config_form_fields.

Input example

SELECT gw_fct_getvisit($${
"client":{"device":3,"infoType":0,"lang":"EN", "cur_user":"test_user"},
"form":{},
"data":{"relatedFeature":{"type":"arc", "id":"50109", "tableName":"v_edit_arc"},
"fields":{},"pageInfo":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",
  "message": {},
  "apiVersion": {
    "value": "0.9.101"
  },
  "body": {
    "feature": {
      "featureType": "visit",
      "tableName": "ve_visit_arc_inspection",
      "idName": "visit_id",
      "id": 5410
    },
    "form": {
      "formId": "F11",
      "formName": "VISIT - 5410",
      "formTabs": [
        {
          "tabName": "tab_data",
          "tabLabel": "Data",
          "tooltip": "Data",
          "tabFunction": {
            "name": "gwGetVisit",
            "parameters": {
              "form": {
                "tabData": {
                  "active": true
                },
                "tabFiles": {
                  "active": false
                }
              }
            }
          },
          "tabActions": [
            {
              "actionName": "actionAddFile",
              "actionFunction": "gwSetFileInsert",
              "actionTooltip": "Add file",
              "disabled": false
            }
          ],
          "active": true,
          "fields": [
            {
              "label": "Accept",
              "columnname": "acceptbutton",
              "column_id": "acceptbutton",
              "widgetname": "data_acceptbutton",
              "widgettype": "button",
              "widgetfunction": "set_visit",
              "widgetaction": "set_visit",
              "updateaction": "set_visit",
              "changeaction": "set_visit",
              "type": "button",
              "name": "acceptbutton",
              "dataType": null,
              "widgetAction": "gwSetVisit",
              "updateAction": "gwSetVisit",
              "changeAction": "gwSetVisit",
              "position": "footer",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": null,
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 1,
              "layoutname": "lyt_bot_1",
              "layoutorder": 1,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            },
            {
              "label": "Back",
              "columnname": "backbutton",
              "column_id": "backbutton",
              "widgetname": "data_backbutton",
              "widgettype": "button",
              "widgetfunction": "set_previous_form_back",
              "widgetaction": "set_previous_form_back",
              "updateaction": "set_previous_form_back",
              "changeaction": "set_previous_form_back",
              "type": "button",
              "name": "backbutton",
              "dataType": null,
              "widgetAction": "backButtonClicked",
              "updateAction": "backButtonClicked",
              "changeAction": "backButtonClicked",
              "position": "footer",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": null,
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 2,
              "layoutname": "lyt_bot_1",
              "layoutorder": 2,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            },
            {
              "label": "Visit type:",
              "columnname": "class_id",
              "column_id": "class_id",
              "widgetname": "data_class_id",
              "widgettype": "combo",
              "widgetfunction": "get_visit",
              "widgetaction": "get_visit",
              "updateaction": "get_visit",
              "changeaction": "get_visit",
              "type": "combo",
              "name": "class_id",
              "dataType": "integer",
              "widgetAction": "gwGetVisit",
              "updateAction": "gwGetVisit",
              "changeAction": "gwGetVisit",
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "integer",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 3,
              "layoutname": "lyt_data_1",
              "layoutorder": 1,
              "isparent": false,
              "ismandatory": true,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null,
              "comboIds": [
                "5"
              ],
              "comboNames": [
                "Inspection tram"
              ],
              "selectedId": "5"
            },
            {
              "label": "Visit id:",
              "columnname": "visit_id",
              "column_id": "visit_id",
              "widgetname": "data_visit_id",
              "widgettype": "text",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "text",
              "name": "visit_id",
              "dataType": "double",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": true,
              "hidden": false,
              "widgetdim": null,
              "datatype": "double",
              "tooltip": null,
              "placeholder": null,
              "iseditable": false,
              "orderby": 4,
              "layoutname": "lyt_data_1",
              "layoutorder": 3,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null,
              "value": "5410"
            },
            {
              "label": "Arc id:",
              "columnname": "arc_id",
              "column_id": "arc_id",
              "widgetname": "data_arc_id",
              "widgettype": "text",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "text",
              "name": "arc_id",
              "dataType": "double",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": true,
              "hidden": false,
              "widgetdim": null,
              "datatype": "double",
              "tooltip": null,
              "placeholder": null,
              "iseditable": false,
              "orderby": 5,
              "layoutname": "lyt_data_1",
              "layoutorder": 4,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null,
              "value": "50109"
            },
            {
              "label": "Code:",
              "columnname": "ext_code",
              "column_id": "ext_code",
              "widgetname": "data_ext_code",
              "widgettype": "text",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "text",
              "name": "ext_code",
              "dataType": "string",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "string",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 6,
              "layoutname": "lyt_data_1",
              "layoutorder": 6,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            },
            {
              "label": "Catalog visita:",
              "columnname": "visitcat_id",
              "column_id": "visitcat_id",
              "widgetname": "data_visitcat_id",
              "widgettype": "combo",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "combo",
              "name": "visitcat_id",
              "dataType": "string",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": true,
              "hidden": false,
              "widgetdim": null,
              "datatype": "string",
              "tooltip": null,
              "placeholder": null,
              "iseditable": false,
              "orderby": 7,
              "layoutname": "lyt_data_1",
              "layoutorder": 7,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null,
              "comboIds": [
                "1"
              ],
              "comboNames": [
                "INSPECTION"
              ],
              "selectedId": "1"
            },
            {
              "label": "Exploitation:",
              "columnname": "expl_id",
              "column_id": "expl_id",
              "widgetname": "data_expl_id",
              "widgettype": "combo",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "combo",
              "name": "expl_id",
              "dataType": "string",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "string",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 8,
              "layoutname": "lyt_data_1",
              "layoutorder": 8,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null,
              "comboIds": [
                "1"
              ],
              "comboNames": [
                "Expl 1"
              ]
            },
            {
              "label": "Description:",
              "columnname": "descript",
              "column_id": "descript",
              "widgetname": "data_descript",
              "widgettype": "text",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "text",
              "name": "descript",
              "dataType": "string",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "string",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 9,
              "layoutname": "lyt_data_1",
              "layoutorder": 9,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            },
            {
              "label": "User:",
              "columnname": "user_name",
              "column_id": "user_name",
              "widgetname": "data_user_name",
              "widgettype": "text",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "text",
              "name": "user_name",
              "dataType": "string",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "string",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 10,
              "layoutname": "lyt_data_1",
              "layoutorder": 10,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            },
            {
              "label": null,
              "columnname": "divider",
              "column_id": "divider",
              "widgetname": "data_divider",
              "widgettype": "divider",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "formDivider",
              "name": "divider",
              "dataType": null,
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": null,
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 11,
              "layoutname": "lyt_data_1",
              "layoutorder": 10,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            },
            {
              "label": "Start date:",
              "columnname": "startdate",
              "column_id": "startdate",
              "widgetname": "data_startdate",
              "widgettype": "datetime",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "datepickertime",
              "name": "startdate",
              "dataType": "date",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "date",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 12,
              "layoutname": "lyt_data_1",
              "layoutorder": 11,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null,
              "value": "2021-03-22 08:37"
            },
            {
              "label": "End date:",
              "columnname": "enddate",
              "column_id": "enddate",
              "widgetname": "data_enddate",
              "widgettype": "datetime",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "datepickertime",
              "name": "enddate",
              "dataType": "date",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "date",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 13,
              "layoutname": "lyt_data_1",
              "layoutorder": 12,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            },
            {
              "label": "Status:",
              "columnname": "status",
              "column_id": "status",
              "widgetname": "data_status",
              "widgettype": "combo",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "combo",
              "name": "status",
              "dataType": "integer",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "integer",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 14,
              "layoutname": "lyt_data_1",
              "layoutorder": 13,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null,
              "comboIds": [
                "1",
                "2",
                "3",
                "4"
              ],
              "comboNames": [
                "Started",
                "Stand-by",
                "Canceled",
                "Finished"
              ],
              "selectedId": "4"
            },
            {
              "label": "Team:",
              "columnname": "team_tram",
              "column_id": "team_tram",
              "widgetname": "data_team_tram",
              "widgettype": "text",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "text",
              "name": "team_tram",
              "dataType": "string",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "string",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 15,
              "layoutname": "lyt_data_1",
              "layoutorder": 14,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            },
            
            {
              "label": "Observ:",
              "columnname": "observ_tram",
              "column_id": "observ_tram",
              "widgetname": "data_observ_tram",
              "widgettype": "text",
              "widgetfunction": null,
              "widgetaction": null,
              "updateaction": null,
              "changeaction": null,
              "type": "text",
              "name": "observ_tram",
              "dataType": "string",
              "widgetAction": null,
              "updateAction": null,
              "changeAction": null,
              "position": "body",
              "disabled": false,
              "hidden": false,
              "widgetdim": null,
              "datatype": "string",
              "tooltip": null,
              "placeholder": null,
              "iseditable": true,
              "orderby": 18,
              "layoutname": "lyt_data_1",
              "layoutorder": 15,
              "isparent": false,
              "ismandatory": false,
              "linkedaction": null,
              "isautoupdate": false,
              "stylesheet": null,
              "widgetcontrols": null
            }
          ]
        }
      ]
    },
    "data": {
      "layerManager": {},
      "geometry": {}
    }
  }
}
⚠️ **GitHub.com Fallback** ⚠️