# # ITSV GmbH # CCDB - Command and Control Database # # FILE: dquerymfile_rwlist.txt # DESCRIPTION: DQUERY definition for DQUERY rwlist # displays selected records from CCRW with EDIT fields # @querytitle RW-Einträge anzeigen und bearbeiten @querydescription zeigt ausgewählte CCRW-Einträge mit der Möglichkeit der Bearbeitung and @group RWDATA @querytype dbselect @attributenames whereclause:string:{{whereclauseoptions}} @whereclauseoptions { labeltext: "Auswahlkriterium", typedesc: "WHERE-Klausel im SQL-Statement zur Abfrage aus der Tabelle CCRW (ohne vorangestelltes WHERE)", is_optional: true } @title Regelwerks-Einträge @pre_query aux.default_param(that.query,"whereclause",""); that.query.sql = "select RWTYP,RWPARENT,RWNAME,RWVALUE,RWDESC, '' as \"SAVE\", '' as \"DELETE\", '' as \"ACTRESULT\" from CCRW"+ (that.query.whereclause?" where "+that.query.whereclause:"")+ " UNION "+ " select '' as RWTYP, '' as RWPARENT, '' as RWNAME, '' as RWVALUE, '' as RWDESC, '' as \"SAVE\", '' as \"DELETE\", 'neuer Eintrag' as \"ACTRESULT\""; if (that.query.whereclause) that.query.title += " ("+that.query.whereclause+")" @post_query proc: { let escaped_whereclause = that.query.whereclause.replace(/\"/g,'"'); that.result.toptext = "\r\n"+ "

Weitere Aktionen

\r\n"+ "\r\n"; } @decoration { /* no_DEBUG_EVAL */ decorate_colcell: { RWTYP: { cmds: [ { token: "$TEXTINPUT" } ] }, RWPARENT: { cmds: [ { token: "$TEXTINPUT" } ] }, RWNAME: { cmds: [ { token: "$TEXTINPUT", name: "RWNAME", options: { width: 32 } } ] }, RWVALUE: { cmds: [ { token: "$TEXTAREA", name: "RWVALUE", options: { rows: 1, style: "font-family: monospace;" } } ] }, RWDESC: { cmds: [ { token: "$TEXTAREA", name: "RWDESC", options: { rows: 1, cols: 15 } } ] }, SAVE: { cmds: [ { token: "$BUTTON", name: "Speichern", options: { action: "execrest", dataname: "updccrwrec", parameters: "action,RWTYP,RWPARENT,RWNAME,RWVALUE,RWDESC", action_parametername: "action", action_value: "update", RWTYP_parametername: "RWTYP", RWTYP_fromcol: 0, RWPARENT_parametername: "RWPARENT", RWPARENT_fromcol: 1, RWNAME_parametername: "RWNAME", RWNAME_fromcol: 2, RWVALUE_parametername: "RWVALUE", RWVALUE_fromcol: 3, RWDESC_parametername: "RWDESC", RWDESC_fromcol: 4, resulttocol: 7 } } ] }, DELETE: { cmds: [ { token: "$BUTTON", name: "Löschen", options: { action: "execrest", dataname: "updccrwrec", parameters: "action,RWTYP,RWPARENT,RWNAME", action_parametername: "action", action_value: "delete", RWTYP_parametername: "RWTYP", RWTYP_fromcol: 0, RWPARENT_parametername: "RWPARENT", RWPARENT_fromcol: 1, RWNAME_parametername: "RWNAME", RWNAME_fromcol: 2, resulttocol: 7 } } ] }, ACTRESULT: { cmds: [ { token: "$IDCELL" } ] } } }