Search Results for mox

 

 

 

 

 

 

 

 

 

Download Moxie.Build

Upgrade Notes
In order to Upgrade an existing copy of Moxie.Build V4 or V5 to the most recent version of V5, you can use the Upgrade example files found in the Tools folder to help automate upgrading multi-service systems, or you can just replace the following files/folders:
Moxie.exe
Moxie.dll
Default.dll
/DBStore/BuiltIn.*
/Lib
/Public/BuiltIn
/Templates/Admin
/Templates/Clean
/Templates/Default
/Templates/Default5
/Templates/Report

 

Command Line with .mox file

A .mox file, with MOX code in it, can be run from the command line while a Moxie.Build system is not otherwise already running.

 

Moxie.cfg Config

The Moxie.cfg file is read on server start and controls aspects that cannot be changed while the server is running.

 

Moxie.http Headers

The optional Moxie.http file is read on server start and controls the default HTTP headers set for all requests.

 

RecoverMOX$

Takes one parameter, HtmlEscapedString, and returns the Unescaped Version of this string

 

MOX Coding and Programing Language Syntax Documentation

The MOX coding and programming language pays heritage to BASIC, but has been crafted for the specific type of work and environment that is demanded of Moxie.Build.

 

Remote Method

A Remote Method may be called by any other Moxie system. It can be used to divide up a large system among a number of backend servers, or as a public API for 3rd parties. In order to call a Remote Method from MOX, the Remote statement is used.

 

PaaS Method

A PaaS Method may be called by any other Moxie system. In order to call a PaaS Method from MOX, the PaaS statement is used.

 

Moxie.Build for Developers

Moxie.Build Keeps it Simple
The full stack in one app, delivered by one company.
Coding with the MOX server side scripting language is concise, well structured, and keeps your focus on the data. Use Moxie.Build in your company to pull together resources, centralize data, customize business workflows, and act as a highly accessible web portal for staff and customers alike.

 

Public Method

A Public Method may be called from any other Procedure, by the Default plug-in as part of the CMS.

 

Message Handler

A Message Handler is only ever called by the Database on a Database Event. These Event Messages allow a Developer to intercept operations taking place on a per-record level and implement Event based business logic.

 

Include

An Include Procedure cannot be executed directly, the contents of its source code can only be Included into other Procedures using the Include command.

 

Table Action

Table Actions are presented to the users of the Default Admin interface and are also intended to be made available in a dynamic way to users of a customized front end. As an Action, the Procedure is expected to perform some sort of task, such as an automated set of updates to the Database Table.

 

Record Report

Record Reports are presented to the users of the Default Admin interface and are also intended to be made available in a dynamic way to users of a customized front end. As a Report, the Procedure is expected to produce output to be displayed to the user.

 

Table Report

Table Reports are presented to the users of the Default Admin interface and are also intended to be made available in a dynamic way to users of a customized front end. As a Report, the Procedure is expected to produce output to be displayed to the user.

 

Record Action

Record Actions are presented to the users of the Default Admin interface and are also intended to be made available in a dynamic way to users of a customized front end. As an Action, the Procedure is expected to perform some sort of task, such as an automated set of updates to the Database Record.

 

Learn More about Frontend Development

Prerequisites: This tutorial assumes that you have already set up a Category and Procedure if necessary. This page covers some of the basics that are involved in Front End development using the MOX language.

 

Learn More About Managing Files

Prerequisites: This tutorial assumes that you have already set up your Moxie.Build server and logged in. This page covers some of the basics that are involved in managing files and folders in the Moxie.Build system.

 

Folder and File Structure

Brief overview on the file structure and contents under Moxie. The files and folders discussed in this post are those that are essential when upgrading to the most recent version of Moxie.Build , or when troubleshooting server errors.

 

Get Started with Service Setup on a Server

A single Windows OS can host many instances of Moxie.Build, these steps will guide you through the setup process.

 

Get Started with Setting up the Development Environment

Developing in Moxie.Build on localhost give you the advantage of working with the template files natively. When working on procedures (MOX code) you need to access that through the Procedures page in the Admin area of a Moxie.Build system, if running the server on localhost or on a remote server. When running on a remote server, you can edit the template files via the Files page in the Admin area.

 

Cloudflare Origin Certificates

Cloudflare automatically provides free client-facing certificates for your domain, even when using their free service. In addition, they provide free Origin Certificates to encrypt the connection between Cloudflare and your origin Moxie.Build server. Use this article when you are going to have Cloudflare connect to inbound open ports on your Moxie.Build server.

 

Learn More About the Content Management System

Prerequisites: This page assumes that you have already set up your Moxie.Build server and logged in as an admin user. This page covers some of the basics that are involved in using the Content Management aspects of the Moxie.Build system.

 

Licensing

Moxie.Build, in short, may be used and licensed free of charge for education and non-profit organizations. Whenever it is used by government or for-profit organizations the license is granted on a subscription basis.
Moxie.Build includes a number of open source components as part of its distribution; each is subject to their own licenses as included with the files for those components.

 

Setup Table

The Setup Table controls aspects that can be changed while the server is running, and is intended to contain both Moxie.Build specific values as well as application specific.

 

Nightly Management Utility

This utility program manages a server install with one or many Moxie.Build services running by taking care of nightly tasks via a scheduled task.

 

Help with Markdown

Markdown enables simple formatting of plain text via easy to remember conventions. This page will provide you with some pointers on what formatting options are available with "Moxie Flavored Markdown".

 

Simple To Do App with MEAN Stack Comparison

In this example, we use a plain old Moxie.Build system and compare it to the MEAN Stack equivalent by building two functionally equivalent versions of a fleshed out To Do List Application. Both versions utilize local user authentication, a relational database system and the security measures found in typical production-level applications on the web today.

 

Get Started by Making it Your Own

This video demonstrates how to get started with Moxie.Build with basic customization.

 

Get Started with Running on localhost

The following video demonstrates how to download Moxie.Build to your workstation, and run it on localhost.

 

WebSafe$

Takes one parameter, Source

 

HtmlAlert

Takes three parameters, Location, ClassNames, AlertText

 

Verify%

Takes two parameters, Source, AllowedCharacters (case sensitive)

 

Verify$

Takes two parameters, Source, AllowedCharacters (case sensitive)

 

HttpCookie

Takes 6 parameters, Name, Value, Path, Domain, Expires, Other

 

HtmlHistory

Takes two parameters, Title, Path

 

HtmlErr

Takes one parameter, ErrMsg

 

HtmlUpload

Takes seven parameters, Location, Mode, Prompt, Path, Class, Name, HelpText

 

HtmlBlock / End HtmlBlock

Takes two parameters, Location, Mode

 

TimeDif$

Takes two parameters, Source, Value

 

TimeRfc3339$

Takes two parameters, Source, Options

 

TimeSub$

Takes two parameters, Source, Value

 

TallyAny$

Takes two parameters, Source, Match

 

TimeAdd$

Takes two parameters, Source, Value

 

TallyAny%

Takes two parameters, Source, Match

 

TimeUnix$

Takes one parameter, Source

 

TabStream$

Takes one parameter, bNoHeaders

 

Trim$

Takes two parameters, Source, Search

 

SSColNum$

Takes one parameter, Source

 

Tally$

Takes two parameters, Source, Match

 

Tally%

Takes two parameters, Source, Match

 

TimeZone$

Takes two parameters, Source, Value

 

SSColAlpha$

Takes one parameter, Source

 

Lang$

Takes one parameter, Source

 

LastAny$

Takes two parameters, Source, Search

 

JsonEncode$

Has two parameters: Source, Options

 

JsonStream$

Has one parameter, Options

 

Len$

Takes one parameter, a Source value

 

LoadFile$

Takes three parameters, FilePath, Start, Len

 

Left$

Takes two parameters, Source, Value

 

Len%

Takes one parameter, a Source value

 

HttpHeaders$

Has no parameters

 

InStr%

Takes two parameters, Source, Match

 

Http$

Takes 9 parameters, ServerName, Port, bSecure, Mode, Path, ContentType, extraHeader, body, rtnHeaders

 

HttpHeader$

Has one parameter

 

Json$

Has two parameters: Source, Name

 

JsonDecode$

Has two parameters: Source, Options

 

InStr$

Takes two parameters, Source, Match

 

IsGroupType$

Takes two parameters: Username, GroupTypes

 

LongDate$

Takes one parameter, a Date value

 

RecoverTmpl$

Takes one parameter, EscapedTemplate, and returns the Unescaped Version of this string

 

Replace$

Takes one existing Source value, and two parameters, Search, NewVal

 

RecoverHtml$

Takes one parameter, EscapedHTMLString, and returns the Unescaped Version of this string

 

RecoverHtmlObj$

Takes one parameter, EscapedHTMLString, and returns the Unescaped Version of this string

 

Session$

Takes one parameter, Name

 

Shell$

Takes two parameters Command, Options

 

ReplaceAny$

Takes one existing Source value, and two parameters of equal length, SearchVals, NewVals

 

Right$

Takes two parameters, Source, Value

 

ParseCount$

Takes two parameters, Source and Match

 

ParseCountAny%

Takes two parameters, Source and Match

 

Mid$

Takes two parameters, Source, Values

 

ParseCount%

Takes two parameters, Source and Match

 

Plus8Encode$

Takes one parameter, Source

 

PWHash$

Takes three parameters, TableName, Alias, Password

 

ParseCountAny$

Takes two parameters, Source and Match

 

Plus8Decode$

Takes one parameter, Source

 

LoadTabFile

Takes two parameters, FileName, bHasHeader

 

LoadReqFile

Has no parameters

 

LoadRawFile

Takes one parameter, FilePath

 

LoadTabFileWS

Takes two parameters, FileName, bHasHeader

 

Offset

Takes 7 parameters, FieldBase, Destination, Source, OffsetVal, Operator, OpValue, IfLenFld

 

Num

Takes 6 parameters, FieldBase, Destination, Function, Source, Value, IfLenFld

 

Math

Takes a variable number of parameters

 

LoadPipeFileWS

Takes two parameters, FileName, bHasHeader

 

KeepIfAny

Takes a variable number of parameters, FieldBase, Test1, Test2, [etc...]

 

KeepIfAll

Takes a variable number of parameters, FieldBase, Test1, Test2, [etc..]

 

KeepFields

Takes two parameters, FieldBase, FieldNamesList

 

LoadCsvFile

Takes two parameters, FileName, bHasHeader

 

LoadMultipart

Takes two parameters, Data, Boundary

 

LoadJsonFile

Takes two parameters, PathToFile, Options

 

LoadCsvFileWS

Takes two parameters, FileName, bHasHeader

 

Plus8Decode

Takes three parameters, FieldBase, Fields, IfLenFld

 

HtmlBlocks / End HtmlBlocks

Takes two parameters, Location, Mode

 

Time

Takes six parameters, FieldBase, Destination, Function, Source, Value, IfLenFld

 

Text

Takes six parameters, FieldBase, Destination, Function, Source, Value, IfLenFld

 

HtmlDTable

Takes 5 parameters, Location, Mode, Class/ID, Init, bNoAutoAlign

 

Lang

Takes four parameters, FieldBase, Destination, Source, IfLenFld

 

HtmlForm

Takes 6 parameters, Location, Mode, ActionLabel, ActionPath, Class, ActionMethod

 

HtmlETable

Takes 6 parameters, Location, Mode, Div, Data, Script, Extra

 

TabStreamWS

Takes two parameters, CSVData, bNoHeaders

 

SaveJsonFile

Takes two parameters, FileName, Options

 

SaveCsvFile

Takes two parameters, FilePath, bUseHeader

 

Pull

Takes three parameters, QueryName, FieldBase, FieldNames

 

SaveTabFile

Takes two parameters, FileName, bUseHeader

 

TabStream

Takes two parameters, Data, bHasHeader

 

SetIfAny

Takes a variable number of parameters, FieldBase, Destination, Source, Test1, Test2, [etc...]

 

SetIfAll

Takes a variable number of parameters, FieldBase, Destination, Source, Test1, Test2, [etc...]

 

JsonStream

Takes two parameters, Data, Options

 

Flush

Takes one parameter, TableName

 

EndSession

Has no parameters.

 

DeleteTable

Takes one parameter, TableName

 

FlushAll

Has no parameters

 

Login

Takes three parameters, Login, Password, bRememberMe

 

ListProcs

Takes one parameter, TableName

 

Get

Takes two parameters, TableName, IfLenFld

 

CopyTable

Takes four parameters, DestinationTable, SourceTable, bWithParents, bWithPWHashes

 

Raw

Takes one parameter, the contents of which are used for the HTTP Reply Body

 

HttpType

Takes one parameter, Type

 

HttpHeader

Takes two parameters, name, value

 

SubTemplate

Takes three parameters, Location, Mode, TemplateName

 

ChildrenAlias

Takes two parameters, ChildTableName, Mode

 

TemplateType

Takes one parameter, Type

 

TemplateRuntime

Takes one parameter, Name

 

Lookup

Takes six parameters, FieldBase, Destination, Table, Alias, SourceField, IfLenFld

 

ETableStream

Takes two parameters, ExcelTableData, Options

 

CsvStreamWS

Takes two parameters, CSVData, bNoHeaders

 

CsvStream

Takes two parameters, CSVData, bNoHeaders

 

Files

Takes 5 parameters, FieldBase, Destination, Action, Source, IfLenFld

 

JsonEmbed

Has six parameters, UniqueParent, DestField, FieldBase, UniqueChild, EmbedFields, Options

 

Geo

Takes nine parameters, FieldBase, Destination, Function, Source1, Source2, Source3, Source4, Options, IfLenFld

 

Format

Takes five parameters, FieldBase, FieldList, Mask, bBlanks2Zero, IfLenFld

 

Build

Takes a variable number of parameters

 

NewTableRltn

Takes seven parameters, TableName, OtherTableName, ParentChild, Ratio, Note, Attr, DevNote

 

NewTableProc

Takes nine parameters, TableName, ProcName, Type, Params, GroupTypes, Label, Note, DevNote, Source

 

NewTableField

Takes six parameters, TableName, FieldName, Label, Note, Attr, DevNote

 

ParentsAlias

Takes three parameters, ChildTableName, ParentTableName, Mode

 

UpdateTableRltn

Takes eight parameters, TableName, OldOtherTableName, NewOtherTableName, ParentChild, Ratio, Note, Attr, DevNote

 

UpdateTableProc

Takes ten parameters, TableName, OldProcName, NewProcName, Type, Params, GroupTypes, Label, Note, DevNote, Source

 

UpdateTableField

Takes seven parameters, TableName, OldFieldName, NewFieldName, Label, Note, Attr, DevNote

 

If (Not) / And / Or / ElseIf / End If

Takes a variable number of conditional logical if statements

 

Function

A special type of Private Method, called a Private Function, that is intended to return a single value or multiple values simultaneously.

 

If (Not) / Then

Takes a single Field name to test if it is true, with an optional Not operator to test if false, followed by the conditional statement

 

IncrKillCount

Has one parameter.

 

Image

Has 4 parameters, Destination, Action, Source, Value

 

ForEach

Takes a variable number of parameters, QueryName, MethodName, [Param1, [Param2, etc...]]

 

Exception

Takes one parameter, the text of the exception to throw.

 

ETableReply

Takes 2 parameters, Result, Status

 

FailIfRecError

Has no parameters

 

Folder

Takes three parameters, FolderPath, Action, Source

 

File

Takes three parameters, Destination, Action, Source

 

JoinQuery

Takes 5 parameters, DestinationQuery, SourceQuery, DestinationMatchField, SourceMatchField, Mode

 

Prefix

Takes a single string as parameter, which is then appended to each line in the code block.

 

PaaS

Takes three parameters, Url, SaaSTenant, InputQuery, OutputQuery

 

ProcECom

Takes one parameter, QueryName

 

QBox

Takes two parameters, QueryName, Title

 

[Pull] List of Fields from another Query

Takes three parameters, QueryName, FieldBase, FieldNames

 

OnError / End OnError

Takes one parameter, Control

 

Meta

Takes any unspecified data, intended for use by external systems

 

LangWith

Has one parameter, a Content.Lang prefix

 

Method

Private Method contained within a given procedure.

 

NewEComQuery

Takes one parameter, QueryName

 

MsgBox

Takes two parameters, Text, Title

 

 

[DatePicker]

Takes no parameters

 

[If] Assignment (DB Field Attribute)

Parameter is divided into two parts, the Test and the Result if True. The test comes prior to the keyword of Then and the Result if True comes after.

 

[Markdown]

Has one parameter.

 

[!] Limited Selection List (DB Field Attribute)

Parameter is a comma separated list (using CSV rules and not in quotes) of the options made available to the user which are enforced on save.

 

[AccKey] Keyboard Accelorator Key

Takes one parameter which is the keyboard key which will be used as the Access Key for a given Database Table's field.
*Note: By default, each Field's Access Key will be initialized to the first character of the Field's Label.

 

 

 

 

Templates Documentation

Prerequisites: This tutorial assumes that you have already learned about Managing Files .

 

Style Guide, Procedures and Code Documentation

In order for source code to be more readily readable across teams, it is recommended that your source code always be styled according to this style guide.

 

 

Public Method WorkQuery Example

In this example, you will see how to use a public method that works on or with the current WorkQuery that you pass into the method.

 

Wisebox Solutions Inc.

We empower your customers to take action.

 

AppendFile

Takes two parameters, FileName, FileData

 

Error

Takes one parameter, the text of the error to throw.

 

Critical

Takes one parameter, the Name of the critical section

 

LoadPipeFile

Takes two parameters, FileName, bHasHeader

 

[SearchSort]

Parameter is a space separated list of field names to have the display table sorted by when displaying search results in the Admin interface.

 

[RecName]

Takes one parameter

 

[HideAttach]

Has no parameters

 

Export and Import of Database Schema

ExportSchema and ImportSchema are BuiltIn procedures that are available for use with source control systems.

 

[HideNew]

Has no parameters

 

CFApi$

Takes three parameters Method, URL, Body

 

Bom$

Takes one parameter

 

CheckPw$

Takes two parameters, User and Password

 

Ctid$

Has one parameter.

 

CsvStream$

Takes one parameter bNoHeaders and returns the result to an assigned variable

 

ApplyLang$

Takes one parameter

 

[WQMessage]

Takes one parameter, Message, or no parameters

 

[TQResult]

Takes either one parameter, ResultValue, or no parameters

 

[WQRecCount]

Has no parameters

 

AntiCsrf$

Has no params

 

[WQResult]

Takes either one parameter, ResultValue, or no parameters

 

Greg%

Takes one parameter, a date of the form yyyy-mm-dd

 

GeoDistance$

Takes five parameters, Lat1, Long1, Lat2, Long2, Options

 

Greg$

Takes one parameter, a gregorian number

 

Hash$

Takes two parameters, Source, Options

 

Guid$

Takes no parameters

 

FieldDef$

Takes one parameter, FieldName

 

DateTime$

Takes one parameter, Source

 

Cuid$

Has no params

 

ETag$

Takes one parameter, Source

 

ExtractAny$

Takes two parameters, Source , Search

 

Extract$

Takes two parameters, Source, Search

 

[TQRecCount]

Has no parameters

 

Trigger

Takes two parameter, URL, InputQuery

 

SetKillCount

Takes one parameter, Value

 

TRONLog

Takes one parameter, OutputText

 

Cloudflare Integration

Cloudflare is a first and foremost a Web Application Firewall and Content Distribution Network, among other additional services.

 

Try / Catch / Finally / End Try

A traditional way to check for hard errors and enable those errors to error softly.

 

Return

Takes a variable number of parameters.

 

Remote

Takes three parameters, Url, InputQuery, OutputQuery

 

SaveFile

Takes two parameters, FileName, FileData

 

ServerLog

Takes one parameter, ServerLogText

 

Select / Case / End Select

Takes a variable number of conditional statements to compare against a single source

 

Cloudflared Tunnel

Cloudflared Tunnel exposes applications running on your local web server on any network with an internet connection with an outbound tunnel that connects directly to Cloudflare's edge network without the need to configure inbound firewall rules.

 

[Meta]

Takes no parameters

 

[If] Assignment (Top Query)

Parameter is divided into two parts, the Test and the Result if True. The test comes prior to the keyword of Then and the Result if True comes after.

 

[TemplateName]

Takes no parameters

 

[TQMessage]

Takes one parameter, Message, or no parameters

 

[TemplateType]

Takes no parameters

 

[HtmlOutput]

Takes a variable number of parameters

 

[!] Assert (Top Query)

Parameter is a comma separated list (using CSV rules and not in quotes) of the fixed hard coded values to select from

 

Using the Backtick `

Some Work Query command parameters can accept a source of either a Work Query Field name or a text literal. Text literals in these cases are prefixed with a backtick ` character.

 

[DateTime] (Top Query)

Has no parameters

 

[CountIf]

Takes one parameter, TestCondition

 

DateAmPm$

Deprecated, use AmPm$

 

Rem / EndRem

A type of Prefix which allows the developer to separate blocks of code into organized, defined parts to help provide clarity of the logical block and add structure to the code.