Tap Forms JavaScript Scripting 102
Forms, Records, Fields, Values
by T. L. Ford

Section 9: Shortcuts to Objects

Those last few sections were rather detailed. It's time for an easy one.

Like document refers to the currently active Tap Forms database, form refers to the currently active form and record refers to the currently active record.

In those scripts that we wrote on the 'Rescue Animals' form, we had this:

var form_rescue_animals = document.getFormNamed('Rescue Animals');
var records_rescue_animals = form_rescue_animals.getRecords();

It could have been:

var records_rescue_animals = form.getRecords();

record becomes useful in Field scripts.

Sam Moffatt adds: "search, Utils, and console are also special variables." search refers to the currently active search. Utils refers to a collection of predefined functions (see the Tap Forms JavaScript API documentation).

Don't name your own variables with the same name as any of these shortcuts. Those are Tap Forms predefined variables for the active objects.

NEXT - Section 10: Linked Form Records