Working with FPL Scripts

Documentation home

What are scripts? 1

Working with scripts 1

Toolbar 2

Right Click Menu. 3

Script Assistant 3

Global Scripts 4

 

 

See also:       Server-side programming languages, FPL Script Command Syntax, Understanding Verj.io Events

 

 

What are scripts?

Scripts are small programs which can be written in a choice of programming languages. This document covers the use of Forms Processing Language (FPL), the Verj.io English-like scripting language. The full syntax of the language is shown in FPL Script Command Syntax. This language provides you with the ability to:

 

 

Each script can be associated with one or more events. These events occur at different times during processing of a Verj.io form. The event model is described in detail in Understanding Verj.io Events.

 

Working with scripts

Scripts are created from the file menu File > New > Script(FPL) which displays the script editor panel shown below. To delete and copy a script, right-click on the name of the script in the studio tree and choose an option from the menu.

 

 

 

Toolbar

The toolbar contains the following icons:

 

Ctrl-S

Save

Ctrl-Shift-V

Verify. Checks the script syntax. Errors are shown in a messages panel at the bottom of the page.

Ctrl-X

Cut

Ctrl-C

Copy

Ctrl-V

Paste

Ctrl-F

Find/Replace – shows the find and replace dialog

*

Ctrl-Space

Script Assistant

 

Maintain Documentation

 

Show information: shows userid and dates for creation, last update and import of this script

F1

Help – shows this documentation page

 

Undo/Redo

See undo/redo.

 

Right Click Menu

Contains the following:

 

 

Undo

See undo/redo.

 

Redo

See undo/redo

Ctrl-X

Cut

Ctrl-C

Copy

Ctrl-V

Paste

 

Ctrl-A

Select All

Ctrl-F

Find/Replace – shows the find and replace dialog

 

F3

Find Next

 

Shift-F3

Find Previous

 

Ctrl-L

Go to line

 

Ctrl-/

Toggle comment – comments or uncomments selected lines.

 

Script Assistant

The script assistant is designed to assist with the task of editing FPL scripts. It provides lists of form fields, tables, pages etc that can be selected and then inserted directly into the main script window at the current cursor position.

 

The script assistant is activated by holding down the Ctrl key and pressing the space bar, or by clicking the script assistant icon on the toolbar. Once activated, it will remain visible whenever any script is edited and will receive focus whenever Ctrl-Space is pressed from the main script panel.

 

When the script assistant is initially opened it will try to determine the form that is currently been worked on, and this form is shown at the top of the panel. The form can be changed by clicking on the change link.

 

 

Clicking on one of the buttons on the left side of the panel changes the list displayed on the right hand side. This selection can also be made by holding down the Alt key and entering the underlined mnemonic for the button e.g. Alt-P for pages, Alt-F for fields etc, or by using the up and down navigation keys, then pressing the Return key.

 

When a selection is made from the right-hand list panel, the selected text is inserted into the main script panel at the current cursor location and focus is transferred to the main script panel. A selection is made either by highlighting an entry in the list then pressing the Return key or the Insert button, or by double clicking on a list entry. The up and down keys can be used to browse the list.

 

The following lists are available:

 

Commands: list of FPL commands and keywords

Functions: list of available functions

System variables: list of all Verj.io system variables

Resources: list of all external resources in the business view associated with the form shown at the top of the panel

Pages: list of all pages in the form shown at the top of the panel

Tables: list of all tables in the form shown at the top of the panel

Fields: list of all fields in the form shown at the top of the panel

Templates: list of FPL command templates showing the syntax for each command