ASK
Ask is quite a detailed key, which requests information from the user
at generation time. The basic syntax is this:
-
- $ASK [DATE | [ALL]ANIMAL | LITTER | SPECIES | LOCATION | TYPE | NUMBER | STRING] [Message]$
Note that if you are substituting any kind of string value (ASK DATE
or ASK STRING), you must wrap the ASK key inside string delimiters
(`` or ') otherwise you will get SQL errors.
The types are outlined below:
- $ASK DATE message$ - requests a date from the user. A popup
is displayed containing the message and the user is given an ASM date
control to use to select the date. The value substituted is the date
selected by the user in SQL string format appropriate for the database
you are using.
- $ASK ANIMAL$ - requests an animal. A popup displays a list
of all animals on the shelter. The value substituted is the animal
ID.
- $ASK ALLANIMAL$ - requests an animal. A popup displays
a list of all animals in the database. The value substituted is the
animal ID.
- $ASK LITTER$ - requests a litter identifier. A popup displays
a list of the recent, active litters on the system. The value returned
is the litter ID as a string.
- $ASK SPECIES$ - requests a species from the user. A popup
is displayed containing a dropdown of all species on the system with
an additional entry for ``all''. The value substituted is the ID
of the selected species, or 0 if ``all'' was selected (use the SQL
CASE statement to adapt the WHERE clause for all)
- $ASK LOCATION$ - requests an internal location from the
user in the same manner as $ASK SPECIES$
- $ASK VOUCHER$ - requests a voucher from the user in the
same manner as $ASK SPECIES$
- $ASK DIET$ - requests a diet from the user in the same
manner as $ASK SPECIES$
- $ASK TYPE$ - requests an animal type from the user in the
same manner as $ASK SPECIES$
- $ASK NUMBER message$ - requests a numeric value from the
user. A box is popped up containing the message and the user is given
a standard text box to enter the number in. They will not be allowed
to continue until a valid number is entered. The value returned is
the number.
- $ASK STRING message$ - requests a string value from the
user (eg: Name, Address, etc.). A box is popped up containing the
message and the user is given a text box to enter the string in. The
value substituted is the string.
http://sheltermanager.sf.net