Variable, CSS class and ID Naming

From Pengower
Jump to: navigation, search

All Action Script variables together with CSS class and ID names should be in lower camel case (eg. thisIsAnExample).

The names must begin with a letter, (ie. a-z), followed by zero or more characters from the set {a-z, A-Z, 0-9, _}.

For example ‘i’, ‘I’, ‘i1’, ‘i_i’ and ‘test’ are all okay. Whilst, ‘9z’ (number first), ‘test 2’ (a space character) and ‘test#’ (a special character) are not okay

1 Set startDate = TODAY

Action Script arguments, however, should be in upper camel case (eg. ThisIsAnExample).

1 Set OrganisationUnit = tmpArr[1]
2 Set args = {}
3 Add OrganisationUnit To args
4 Set rtn = Do Run Script Params Script Name = "fn Render Organisation Unit Dashboard", Args = args

1 // fn Render Organisation Unit Dashboard
3 // arguments OrganisationUnit object
4 Set organisationUnit = OrganisationUnit

See Also

How to Create Action Scripts

How To Define a Long Running Script

Script Action Library

Run Script