Search Results for code

 

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.

 

Plus8Decode

Takes three parameters, FieldBase, Fields, IfLenFld

 

UrlDecode$

Takes one parameter, Source

 

Syntax and Builtin Values, Procedures and Code Documentation

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

 

Plus8Encode

Takes three parameters, FieldBase, Fields, IfLenFld

 

Plus8Decode$

Takes one parameter, Source

 

Plus8Encode$

Takes one parameter, Source

 

UrlEncode$

Takes one parameter, Source

 

 

 

 

 

 

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.

 

Rem / EndRem

A type of Prefix which allows the programmer to create Remarks or Comments in their code.

 

Truncate$

Takes two parameters, Source, MinLength

 

TextToHtml$

Takes one parameter, Source

 

Sgn%

Takes one parameter, Value

 

Replace$

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

 

RecoverHtmlObj$

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

 

Right$

Takes two parameters, Source, Value

 

Setup$

Takes one parameter, Name

 

SessionIsGroupType$

Takes one parameter, a List of possible group types

 

TemplateType

Takes one parameter, Type

 

AppendTable

Takes one parameter, TableName

 

SubTemplate

Takes three parameters, Location, Mode, TemplateName

 

HttpsEnsure

Takes no parameters.

 

HttpType

Takes one parameter, Type

 

DeleteTableField

Takes two parameters, a FieldBase and FieldNamesList

 

Detach

Takes 3 parameters, ParentTableName, ChildTableName, and a boolean expression (optional)

 

Delete

Takes two parameters, TableName and a boolean expression

 

Attach

Takes 3 parameters, ParentTableName, ChildTableName, IfLenFld

 

CopyTable

Takes two parameters, destinationTable, sourceTable

 

HttpNoCache

Has no parameters.

 

HtmlBlock / End HtmlBlock

Takes two parameters, Location, Mode

 

HtmlButton

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

 

HtmlAlert

Takes three parameters, Location, ClassNames, AlertText

 

Html

Takes 3 parameters, Location, Mode, Text

 

HtmlAButton

Takes 6 parameters, Location, Mode, ActionLabel, ActionPath, Class, Extra.

 

HttpCookie

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

 

HttpHeader

Takes two parameters, name, value

 

HtmlUpload

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

 

HtmlJButton

Takes 6 parameters, Location, Mode, ActionLabel, ActionPath, Class, Extra.

 

HtmlSearchBox

Takes 6 parameters, Location, Mode, ActionPath, Name, Class, Prompt

 

Guid$

Takes no parameters

 

Hash$

Takes one parameter, a source value

 

Greg%

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

 

Greg$

Takes one parameter, a gregorian number

 

Http$

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

 

HttpSoap$

Takes 8 parameters, ServerName, Port, bSecure, Path, ExtraHttpHeaders, Envelope, ExtraBody, xml

 

Hex$

Takes one parameter, a source value

 

HtmlToText$

Takes a single parameter, Source

 

ExtractAny$

Takes two parameters, Source , Search

 

FieldDef$

Takes a single parameter, in the format of TableName.FieldName#Deff where Deff is one of: Label, Attr, Note, or DevNote

 

Exp2%

Takes one parameter, any numeric value.

 

Extract$

Takes two parameters, Source, Search

 

FirstAlias$

Takes one parameter, TableName

 

FolderExists$

Takes one parameter, the path of the folder

 

FileExists$

Takes one parameter, the path where the file is located.

 

FileSize$

Takes one parameter, a value in number of bytes.

 

Len%

Takes one parameter, a Source value

 

Len$

Takes one parameter, a Source value

 

LastAny$

Takes two parameters, Source , Search

 

Left$

Takes two parameters, Source, Value

 

Parse$

Takes four parameters, Source, bAny, Search, Item

 

RecoverHtml$

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

 

LoadFile$

Takes one parameter, PathToFile

 

NbSp$

Takes no parameters

 

InStrAny%

Takes two parameters, Source, Match

 

InStrAny$

Takes two parameters, Source, Match

 

InStr%

Takes two parameters, Source, Match

 

InStr$

Takes two parameters, Source, Match

 

Lang$

Takes four parameters, FieldBase, Destination, Source, IfLenFld

 

Last$

Takes two parameters, Source , Search

 

IsValidAlias$

Takes one parameter, a Source value

 

JsonStream$

Used to manipulate a WorkQuery into a JSON type

 

Set

Takes four parameters, FieldBase, Destination, Source, IfLenFld

 

SetEnsure

Takes two parameters, FieldName, Value

 

SaveJsonFile

Takes two parameters, FileName, Options

 

SendEmail

Takes 10 parameters, FieldBase, From, To, Subject, Body, bMerge, AttachName, AttachPath, Slow, IfLenFld

 

SetIfAll

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

 

SetLast

Takes four parameters, FieldBase, Destination, Source, IfLenFld

 

SetFirst

Takes four parameters, FieldBase, Destination, Source, IfLenFld

 

SetIf

Takes six parameters, FieldBase, Destination, Source, Left, Comparison, Right

 

Offset

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

 

Parse

Takes seven parameters, FieldBase, Destination, Source, bAny, Delimiter, Item, IfLenFld

 

MergeRecords

Takes 5 parameters, FieldBase, GroupBy, MergeField, Delimiter, bKeepBlanks

 

Num

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

 

ResetFields

Takes two parameters, FieldBase, FieldNames

 

SaveCsvFile

Takes one parameter, FilePath

 

ParseRecords

Takes two parameters, WorkFieldBase + FieldToParse, Delimiter

 

Pull

Takes three parameters, QueryName, FieldBase, FieldNames

 

SetNew

Takes two parameters, FieldName, FieldValue

 

HtmlETable

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

 

HtmlNav

Takes 7 parameters, Location, Mode, Title, TitleLink, Class, HtmlPre, HtmlApn

 

HtmlDropdown

Takes 5 parameters, Location, Mode, Title, Element, Class

 

HtmlDTable

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

 

HtmlTab

Takes 3 parameters, Location, Mode, bWithNoHeader

 

HtmlTable

Takes 6 parameters, Location, Mode, Class, bNoHeader, bNoAutoAlign, bNoIDTags

 

HtmlNavbar

Takes 10 parameters, Location, Mode, Title, TitleLink, Class, Fixed, bNotResponsive, bInverted, HtmlPre, HtmlApn

 

HtmlRaw

Takes 3 parameters, Location, Mode, bWithNoHeader

 

Text

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

 

Value

Takes four parameters, FieldBase, Destination, Function, IfLenFld

 

Sort

Takes two parameters, FieldBase, SortFieldList

 

SSReference

A command to help build spreadsheets

 

GetFieldDefs

Has no parameters.

 

HtmlBlocks / End HtmlBlocks

Takes two parameters, Location, Mode

 

WithAll

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

 

WithGroup

Takes six parameters, FieldBase, GroupByField, Destination, Action, Source, IfLenFld

 

MergeFields

Takes 4 parameters, FieldBase, Destination, SourceFields, Delimiter

 

SkipCalls

Takes no parameters

 

Update

A database command which takes two parameters, TableName, IfLenFld

 

Session

Takes two parameters, Name, Value

 

Setup

Takes two parameters, Name, Value

 

Build

Takes a variable number of parameters

 

DeleteFields

Takes two parameters, FieldBase, FieldNameList

 

UpdateOrNew

A database command which takes two parameters, TableName, IfLenFld

 

UpdateOrNewWithAttach

A database command which takes four parameters, TableName, Relation, OtherTableName, IfLenFld

 

Get

Takes one parameter, a TableName

 

Login

Takes three parameters, Login, Password, bRememberMe

 

DetachWithDelete

Takes 4 parameters, TableName, Relation, OtherTableName, and a boolean expression (optional)

 

EmptyTable

Takes one parameter, the name of a database table

 

NewWithAttach

Takes 4 parameters, TableName, Relation, OtherTableName, IfLenFld

 

Search

Takes three parameters, TableName, SearchTerms, SearchInFields

 

Lookup

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

 

New

Takes two parameters, TableName, IfLenFld

 

Discard

Has no parameters

 

KeepIfSimilar

Takes 3 parameters, FieldBase, pOne, pTwo

 

ListFiles

Takes 3 parameters, Folder, Filter, bShowImgSize

 

KeepIf

Takes 4 parameters, FieldBase, Left, Comparison, Right

 

KeepIfFound

Takes 3 parameters, FieldBase, Fields, SearchTerms

 

LoadTabFile

Takes two parameters, FileName, bHasHeader

 

Math

Takes a variable number of parameters

 

ListFolders

Takes two parameters, FolderPath, bRecursive

 

LoadRawFile

Takes one parameter, FilePath

 

ETableStream

Takes two parameters, ExcelTableData, Options

 

Files

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

 

EnsureFields

Takes two parameters, FieldBase, FieldNames

 

EnsureNavFields

Takes two parameters, FieldBase, FieldNamesList

 

Images

Takes up to 6 parameters, FieldBase, FileName, Action, Val1, Val2, IfLenField

 

JsonStream

Used to manipulate a WorkQuery into a JSON type

 

FixFields

Takes one parameter, a single character

 

Group

Takes 7 parameters, FieldBase, GroupBy, GroupTotals, GrandTotals, Seperator, TotalPre, TotalPost

 

Exp10%

Has one parameter, any numeric value.

 

[R] Readonly

Has no parameters.

 

[Raw] Raw HTML

Accepts one parameter which is the raw HTML content to be placed in the form at the Field's location.

 

[Placeholder]

Accepts one parameter

 

[Score] 0.0 to 10

Accepts 3 parameters, first is required, 2nd and 3rd are optional.

 

[Sort] (DB Field Attribute)

Used as a Relationship Attribute, the parameter is a space separated list of field names

 

[SearchSort]

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

 

[SearchFieldList]

Parameter is a space separated list of field names to be displayed when the user is viewing results from the Search List.

 

[Max]

Accepts a numeric value as a parameter.

 

[Markdown]

Has no parameters.

 

[!] Limited Selection List

Parameter is a comma separated list (without quotes) of the options made available to the user and enforced on save. If the Parameter is just the single word Checkbox, then instead of a drop down list with values, the user will be given a single checkbox; if it is unchecked the value will be blank, and if it is checked the value will be "y". When used with a Top Query in MOX, this will ensure the field value matches one of the options, if not it will throw a run time error.

 

[MaxLen]

Accepts a numeric value as a parameter.

 

[MText] Multiline Text Editor

Accepts one optional numeric value as a parameter

 

[Min]

Accepts a numeric value as a parameter.

 

 

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.

 

 

[Sort] (DB Relationship Attribute)

Accepts a space separated list of field names.

 

Public Method

A Public Method may be called from any other Procedure, by the Default plug-in, or a Custom COM DLL. Each Public Method may either use specific Input Parameters, or it may accept an Input Query.

 

CFPurge

Takes one parameter, the string URL to send to CloudFlare's API

 

AppendQuery

Takes 3 parameters, DestinationQuery, SourceQuery, bMoveIt

 

AjaxReply

Has no parameters

 

[Temp] Field

Parameter is a single new field name or a space separated list of new field names.

 

[+] Sum of Field of Attached Child Records

Parameter is the table and field name that you want to sum in the form of TableName.FieldName. The specified Table must be a Child of the calling Record.

 

[State] Error State

Takes one parameter.

 

[Time] (DB Field Attribute)

Has no parameters.

 

 

[FieldList]

Parameter is a space separated list of field names to be displayed.

 

 

[L] Lookup (DB Field Attribute)

Parameter is the database path that is to be looked up in the form of TableName|Alias|FieldName where it may be a specific fixed path or you may use {} to replace one or more of the path components where the value inside the {} is a field name in the current record.

 

Firefox Extension - It's All Text!

This guide explains how to set up the Firefox extension It's All Text! to more easily edit your MOX procedures.

 

Templates Documentation

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

 

Overview for PHP Developers

This hands-on experience article is written by an experienced PHP developer, and serves as an overview to help you understand the similarities and differences.

 

Setting Up Your Moxie

This guide explains how to download Moxie.Build from our website, and launch it locally for development.

 

 

Importing MOX to Your Text Editor - UltraEdit

This guide explains how to set up the text editor UltraEdit for development in MOX.

 

Importing MOX to Your Text Editor - Notepad++

This guide explains how to set up the text editor Notepad++ for development in MOX.

 

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.

 

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.

 

 

 

Licensing

Moxie.Build, in short, may be used free of charge for education, development, or non-profit organizations. Whenever it is deployed by government or for-profit organizations to a production environment the license is granted on a subscription basis.

Moxie.Build includes a number of open source components as part of its distribution. These are subject to their own licenses as included with the files for those components.

 

 

Learn More About the Content Management System

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 using the Content Management aspects of the Moxie.Build system.

 

 

[DatePicker]

No parameters, provides a user friendly date picker as the input field for a given Field.

 

 

 

[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.

 

[Header] Raw HTML

Accepts one parameter which is the raw HTML content to be placed in the form, above the Field's location.

 

[Footer] Raw HTML

Accepts one parameter which is the raw HTML content to be placed in the form, below the Field's location.

 

[Ajax]

Takes 3 parameters, Trigger, DestinationID, Path

 

[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.

 

[A] Copy Attached Value

Parameter must first specify only looking at Parents ( PARENT ) or only looking at Children ( CHILD ). The remainder of the parameter should be the table and field name you are after in the form of TableName.FieldName.

 

[&] Count Attached Child Records

Takes 1 Parameter which is the Table name that you want to count the Attached Records in. The specified Table must be a Child of the calling Record's Table.

 

[Date] (DB Field Attribute)

Has no parameters.

 

[D] Default Value

Parameter is a value or an expression to be used when a record is created if no value is specified during the creation. The value or expression is run through the Assignment Attribute in order to calculate it's result.

 

 

Const

Takes two parameters, the variable name and a value

 

Bin$

Takes one parameter

 

ATn%

Takes one parameter

 

ApplyLang$

Takes one parameter

 

CFApi$

Takes one parameter, a string parameter of the desired API command

 

Compress$

Compress any value/table

 

Chr$

Takes one parameter

 

CheckPw$

Takes two parameters, the User Alias, and the User PW to check

 

[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.

 

TRON

Takes one parameter, FilePath

 

SetKillCount

Takes one parameter, Value

 

Abs%

Has one parameter, a numeric value.

 

AnsiToUtf8$

Has one parameter.

 

AnsiToUtf16$

Has one parameter.

 

AmPm$

Takes one parameter

 

Dir$

Takes one parameter, a path-mask

 

Decrypt$

Takes two parameters, an encrypted value and the decryption key

 

DayOfWeek$

Takes one parameter, a date

 

DnsIp$

Takes one parameter, a domain name

 

Exists$

Takes two parameters, DBTableName, DBTableRecordAlias

 

Encrypt$

Takes two parameters, SourceValue, EncryptionKey

 

DnsName$

Takes one parameter, an IPv4 Address

 

Currency$

Takes one parameter, a numeric value

 

Cuid$

Has no params

 

Cos%

Takes one parameter

 

Date$

Takes one parameter, a string containing a date

 

Day$

Takes one parameter, a date

 

DateTime$

Takes one parameter, a string containing a date and time

 

DateAmPm$

Takes one parameter, a string containing a date and time

 

ServerLog

Takes one parameter, ServerLogText

 

ForEach

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

 

Folder

Takes two parameters, FolderPath, Action

 

File

Takes 3 parameters, Destination, Action, Source

 

Foreign

Takes a single parameter, a QueryName

 

If (Not) / Then

Takes a single Field name, with an optional Not operator, followed by the conditional statement

 

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

Takes a variable number of conditional statements

 

GoTo

Takes one parameter, a Label

 

CopyQuery

Takes two parameters, destinationQuery, sourceQuery

 

CopyFirst

Takes two parameters, DestinationQuery, SourceQuery

 

CopyFields

Takes two parameters, DestinationFields, SourceFields

 

EmailErr

The email address that will receive any run time errors that a website encounters

 

FailIfRecError

Has no parameters

 

Exit (Proc)

Takes no parameters

 

[Ensure] Field Exists

Takes a variable number of parameters, a comma separated list of TopQuery variable names

 

Image

Has 4 parameters, FileName, Action, Val1, Val2

 

OnError (Continue)

Used as a scoping keyword, similar to WorkWith/End WorkWith .

 

NewQuery

Takes 3 parameters, QueryName, SourceQuery, bWork

 

NewEComQuery

Takes one parameter, QueryName

 

SaveHttpFile

Takes two parameters, FileName, URL

 

Remote

Takes three parameters, Url, InputQuery, OutputQuery

 

[Pull] List of Fields from another Query

Takes up to three parameters, QueryName, FieldBase, FieldNames

 

[New] Field

Takes one parameter, a comma separated list of FieldNames

 

IncrKillCount

Has one parameter.

 

Include

Takes one parameter, ProcedureName

 

LangWith

Has one parameter, a Content.Lang prefix

 

MapQuery

Takes five parameters, DestQuery, SourceQuery, SourceXFld, SourceYFld, SourceZFld

 

LookupQuery

Takes six parameters, DestQuery, SourceQuery, DestDestFld, DestXFld, DestYFld, SourceYFld

 

 

Lookup$

Takes one parameter, in the form of: Table|{Alias}|Field