The Form Scripts library is a collection of Form Segments that
perform the following functions:-
Set Grid Page Rows
|
The ‘Set Grid Page Rows’
form segment enables
users to define the settings for grid page rows
in accordance with the form.
(It is not totally effective yet as the form requires a
refresh to change the page length. We are extending this
to allow the value to be reset now that submit and cancel
scripts can be run. Currently this can only be defined
across the entire system, even for Alert Lists).
|
Disable Buttons
|
When buttons are hidden, it is often confusing
to the user as the full functionality of the form
is not evident. Setting an identical button
behind the ‘real’ button has the effect of
simulating a disabled button as opposed to a
hidden button.
|
Colour Buttons
|
Colour buttons are used to provide enhanced
visual indicators to the actual button
functionality. E.g. Add = Green, Update = Blue,
and Delete = Red. The font is also changed to
bold.
|
|
|
-
Publish the Forms
Scripts Library.
-
Open the Demo Form
Scripts procedure.
-
Select the Procedure
Properties dialog,
associate the Forms
Scripts library and
publish the procedure.
|
|
-
From the blank forms
list select the Demo
Grid Rows procedure.
In this example, when
the form is loaded
the page grid rows
will be set to 200.
This is only visible
when you reload this,
or any other form for
that matter.
|
|
-
On the Form
Properties – ‘Do this’
tab, change the form
load command to:-
OnLoad=SetGridPageRows(5)&Language=Jscript
|
|
-
Republish the
procedure and test it
again. In this
example, only 5 rows
from the 16,323 returned are
displayed:-
|
|
IMPORTANT – As the Grid Page Rows value affects all lists across the
entire system, once you have tested this, reset the on form load
command back to the original setting:-
OnLoad=SetGridPageRows(200)&Language=Jscript
*You may also have to delete the cookies from your browser
cache.
|
|
|
-
When the form is
loaded, the “Disable
Buttons” and “Colour
Buttons” functions are
called:-
OnLoad=DisableButtons("AddD,UpdateD,DeleteD");ColourButtons("Add,Green,Update,Blue,Delete,Red")&Language=JScript
|
|
-
Selecting a checkbox
will display the colour
button(s).
|
|
-
When the user clicks
an activated button, it
is greyed out momentarily.
|
|
|
|
|
|