{
  "pluginname": "Plugin Developer",
  "version": 1.3,
  "systemplugin": true,
  "table_def": [
    {
      "name": "plugin_developer",
      "fields": [
        {
          "name": "pluginname",
          "type": "varchar(25)",
          "other": "NOT NULL"
        },
        {
          "name": "formtype",
          "type": "varchar(25)",
          "other": "NOT NULL DEFAULT 'Default'"
        },
        {
          "name": "version",
          "type": "float",
          "other": "NOT NULL DEFAULT '1.0'"
        },
        {
          "name": "systemplugin",
          "type": "tinyint",
          "other": "NOT NULL DEFAULT 0"
        },
        {
          "name": "table_def",
          "type": "varchar(3000)",
          "other": "NOT NULL DEFAULT ''"
        },
        {
          "name": "sqlcommands_oninstall",
          "type": "varchar(2000)",
          "other": "NOT NULL DEFAULT ''"
        },
        {
          "name": "form",
          "type": "varchar(4000)",
          "other": "NOT NULL DEFAULT ''"
        },
        {
          "name": "form_html",
          "type": "varchar(3000)",
          "other": "NOT NULL DEFAULT ''"
        },
        {
          "name": "navbutton",
          "type": "varchar(1000)",
          "other": "NOT NULL DEFAULT ''"
        },
        {
          "name": "script",
          "type": "varchar(3000)",
          "other": "NOT NULL DEFAULT ''"
        },
        {
          "name": "formbuttons",
          "type": "varchar(1000)",
          "other": "NOT NULL DEFAULT ''"
        },{
          "name": "others",
          "type": "varchar(3000)"
        },
        {
          "name": "sqlstatement",
          "type": "varchar(5000)",
          "other": "NOT NULL DEFAULT ''"
        },
        {
          "name": "status",
          "type": "tinyint",
          "other": "NOT NULL DEFAULT 0"
        }
      ]
    }
  ],
  "sqlcommands_oninstall": [],
  "form": {
    "name": "plugin_developer",
    "formtype": "Default",
    "title": "Plugin Developer",
    "icon": "mif-power-cord fg-crimson",
    "saveButton": true,
    "savecustomid":5,
    "getrecordcustomid":6,
    "cancelButton": true,
    "flex_row": "true",
    "flex_justify": "around",
    "width": "80%",
    "field": [
      {
        "name": "pluginname",
        "label": "Plugin Name",
        "fieldtype": "s",
        "type": "text",
        "maxlength": "25"
      },
      {
        "name": "systemplugin",
        "label": "Is System Plugin",
        "fieldtype": "n",
        "type": "select",
        "option": "0:No,1:Yes",
        "maxlength": "25"
      },
      {
        "name": "formtype",
        "label": "Form Type",
        "fieldtype": "s",
        "type": "select",
        "option": "Default,Multi Entry Form,Tabular Form"
      },
      {
        "name": "version",
        "label": "Version",
        "fieldtype": "n",
        "type": "text",
        "autoincrement": "0.1",
        "required": "Yes"
      },
      {
        "name": "table_def",
        "label": "Table Definition",
        "fieldtype": "s",
        "type": "textarea",
        "jsonArrayBuild": "true",
        "jsonarrayfieldheaders": "Field,Field Type,Other",
        "jsonarrayfields": "name,type,other",
        "jsonarrayfieldinputtypes": "text,text,text",
        "jsonarrayofarray": "true",
        "jsonarrayfieldinputoptions": "",
        "jsonarrayfieldgroupname": "fields",
        "jsonfields": "name",
        "jsonfieldheaders": "Table Name",
        "maxlength": "3000"
      },
      {
        "name": "sqlcommands_oninstall",
        "label": "SQL Commands on install",
        "fieldtype": "s",
        "type": "textarea",
        "jsonArrayBuild": "true",
        "jsonarrayfieldheaders": "SQL Statement",
        "jsonarrayfields": "sql_command",
        "maxlength": "2000",
		"required":"Yes"
      },
      {
        "name": "form",
        "maxlength": "4000",
        "label": "New Form JSON",
        "fieldtype": "s",
        "type": "textarea",
        "jsonArrayBuild": "true",
        "jsonarrayfieldheaders": "Field Name,Label,Field Type,Input Type,Option,Required,Autoincrement,Allow Null,Max Length,Json Build,Json Headers,Json Fields,Json Fields Input Type,Json Fields Input Option",
        "jsonarrayfields": "name,label,fieldtype,type,option,required,autoincrement,allownull,maxlength,jsonArrayBuild,jsonfieldheaders,jsonfields,jsonfieldinputtypes,jsonfieldinputoptions",
        "jsonarrayfieldinputtypes": "text,text,select,select,text,select,text,select,text,select,text,text,text,text",
        "jsonarrayfieldinputoptions": ";;s:String or Equivalent,d:Date,u:Unique Identifier,n:Numeric;text:Text,hidden:Hidden,textarea:TextArea,select:Select,select3:Select3,datepicker:Date Picker,checkbox:Checkbox,file:File Upload;;Yes:Yes,:No;;1:Yes,0:No;;0:No,1:Yes;;;;",
        "jsonarrayfieldgroupname": "field",
        "jsonfields": "name,formtype,title,icon,saveButton,cancelButton,flex_row,flex_justify,width,tabularform,savecustomid,getrecordcustomid",
        "jsonfieldheaders": "Form Name,Form Type,Title,Icon,Save Button,Cancel Button,Flex Direction,Flex Justify,Width,Tabular Form,Save Custom Id,Get Record Custom Id",
        "jsonfieldinputtypes": "text,select3,text,text,select,select,select,select,text,text,text,text",
        "jsonfieldinputoptions": ";Default,Multi Entry Form,Tabular Form;;;true:Needed,false:Not Needed;true:Needed,false:Not Needed;true:Row,false:Column;start:Start,end:End,center:Center,between:Between,around:Around;;"
      },
      {
        "name": "form_html",
        "maxlength": "3000",
        "label": "New Form HTML",
        "fieldtype": "s",
        "type": "textarea"
      },
      {
        "name": "navbutton",
        "maxlength": "1000",
        "label": "Menu Button/s",
        "fieldtype": "s",
        "type": "textarea",
        "jsonArrayBuild": "true",
        "jsonarrayfieldheaders": "Custom Id,Caption,Icon,Button Type,Button Group,Tab,Order,Onclick",
        "jsonarrayfields": "customid,caption,icon,btntype,btngroup,btntab,btnorder,onclick",
        "jsonarrayfieldinputtypes": "text,text,text,select3,text,text,text,select3",
        "jsonarrayfieldinputoptions": ";;;ribbon-button;;;;initializePlugin()"
      },
      {
        "name": "script",
        "maxlength": "3000",
        "label": "Script",
        "fieldtype": "s",
        "type": "textarea"
      },
      {
        "name": "formbuttons",
        "maxlength": "1000",
        "label": "Tool Buttons",
        "fieldtype": "s",
        "type": "textarea",
        "jsonArrayBuild": "true",
        "jsonarrayfieldheaders": "Name,Caption,Icon,Onclick",
        "jsonarrayfields": "name,caption,icon,onclick",
        "jsonarrayfieldinputtypes": "text,text,text,select3",
        "jsonarrayfieldinputoptions": ";;;showNewForm('||formName||'),||sqlStatementOptions||"
      },
      {
        "name": "sqlstatement",
        "maxlength": "5000",
        "label": "SQL Statements for Reports",
        "fieldtype": "s",
        "type": "textarea",
        "jsonArrayBuild": "true",
        "jsonarrayfieldheaders": "Custom Id,Name,SQL,Header,Filter Needed,Filter Fields,Filter Fields Operator,Filter Fields Caption,Filter Fields Types,Filter Fileds Input Types,Filter Fields Option, Edit Record,Delete Record,Restore Record,Change Status,Set Appendix,Function1,Function2,Function3,Function4",
        "jsonarrayfields": "customid,name,sql,header,filter,filter_fields,filter_fields_operator,filter_fields_caption,filter_fields_type,filter_fields_inputtype,filter_fields_option,edit_record,delete_record,restore_record,change_status,set_appendix,function1,function2,function3,function4",
        "jsonarrayfieldinputtypes": "text,text,text,text,select,text,text,text,text,text,text,select,select,select,text,text,text,text,text,text",
        "jsonarrayfieldinputoptions": ";;;;0:No,1:Yes;;;;;;0:No,1:Yes;0:No,1:Yes;0:No,1:Yes;0:No,1:Yes;;;;;;"
      },
      {
        "name": "others",
        "maxlength": "1000",
        "label": "Others",
        "fieldtype": "s",
        "type": "textarea"
      }
    ]
  },
  "form_html": "",
  "navbutton": [
    {
      "customid": "1",
      "caption": "Plugin Developer",
      "icon": "mif-developer_board fg-brown",
      "btntype": "ribbon-button",
      "btngroup": "Plugin",
      "btntab": "Developer",
      "btnorder": "4",
      "onclick": "initializePlugin();"
    }
  ],
  "formbuttons": [
    {
      "name": "addDraftPlugin",
      "caption": "",
      "icon": "mif-plus fg-red",
      "onclick": "showNewForm('plugin_developer')"
    },
    {
      "name": "draftPlugin",
      "caption": " Draft Plugin",
      "icon": "mif-developer_board fg-teal",
      "onclick": "getTableFromSqlStatement('1')"
    },
    {
      "name": "ActivePlugin",
      "caption": " Active Plugin",
      "icon": "mif-developer_board fg-green",
      "onclick": "getTableFromSqlStatement('2')"
    },
    {
      "name": "deletedPlugin",
      "caption": " Deleted Plugin",
      "icon": "mif-developer_board fg-red",
      "onclick": "getTableFromSqlStatement('3')"
    }
  ],
  "script": "",
  "sqlstatement": [
    {
      "customid": "1",
      "name": "Draft Plugin",
      "sql": {"action":"Get Table","formname":"plugin_developer","fld":"pluginname,createdon,status","tbl":"plugin_developer","whr":"status=0 and recordstatus>=1"},
      "header": "Plugin,Created On,Status",
      "edit_record": "1",
      "delete_record": "1",
      "change_status": "1:Activate:Record Activated:Record Activation Failed",
      "function1": "pluginDeveloperExportJSON:id:Export JSON",
      "function2": "createTableForTestPlugin:id:Create Table",
      "function3": "formBuilderinitializePlugin:id:Test Plugin"
    },{
      "customid": "2",
      "name": "Active Plugin",
      "sql": {"action":"Get Table","formname":"plugin_developer","fld":"pluginname,createdon,status","tbl":"plugin_developer","whr":"status=1 and recordstatus>=1"},
      "header": "Plugin,Created On,Status",
      "edit_record": "1",
      "change_status": "0:Make Draft:Record Converted to Draft:Process Failed while converting to Draft"
    },{
      "customid": "3",
      "name": "Deleted Plugin",
      "sql": {"action":"Get Table","fld":"pluginname,createdon,status","tbl":"plugin_developer","whr":"recordstatus=0"},
	  "header": "Plugin,Created On,Status",
      "restore_record": "1"
    },{
      "customid": "4",
      "name": "export JSON",
      "sql": {"action":"Get Row","fld":"pluginname,systemplugin,version,table_def,sqlcommands_oninstall,form,form_html,navbutton,script,formbuttons,sqlstatement,others","tbl":"plugin_developer","whr":"id='||PLUGINID||'","param":"PLUGINID"},
	  "header": "Plugin,Created On,Status"
    },{
		"customid":"5",
		"name":"saveRecord",
		"sql":{"action":"Save Table","validate":"users","outputto":"html","output":"res","command":"insertorupdate","tbl":"plugin_developer","fld":"pluginname,systemplugin,formtype,version,table_def,sqlcommands_oninstall,form,form_html,navbutton,script,formbuttons,sqlstatement,others","fldtype":"s,n,s,n,s,s,s,s,s,s,s,s,s","value":"||pluginname||,||systemplugin||,||formtype||,||version||,||table_def||,||sqlcommands_oninstall||,||form||,||form_html||,||navbutton||,||script||,||formbuttons||,||sqlstatement||,||others||","whr":"id='||ID||'","onsuccess":"cmd:dom,fun:showtoast;success;Saving Successful","onfailure":"cmd:dom,fun:showtoast;alert;Saving Failed"}
	},{
		"customid":"6",
		"name":"getRecord",
		"sql":{"action":"Get Row","validate":"users","outputto":"html","output":"edit","tbl":"plugin_developer","fld":"id,pluginname,systemplugin,formtype,version,table_def,sqlcommands_oninstall,form,form_html,navbutton,script,formbuttons,sqlstatement,others","whr":"id='||ID||'","param":"ID"}
	}
  ]
}