Tag Name |
Description |
[FMP-CurrentRecordNumber] |
What it does
[FMP-CurrentRecordNumber] is replaced with the record's
position in the current found set.
Syntax example(s)
Returns the current record number using an HTML file
Current record in found set: [FMP-CurrentRecordNumber]
<!-- After processing it could look like:
Current record in found set: 3
-->
Back to Top |
[FMP-CurrentRepeatNumber] |
What it does
[FMP-CurrentRepeatNumber] is replaced with the repetition
currently being processed.
Syntax example(s)
Returns the current repetition number using an HTML
file
<!-- Add a number in front of each repetition -->
[FMP-Repeating: extensions]
[FMP-CurrentRepeatNumber]: [FMP-RepeatingItem]<br>
[/FMP-Repeating]
<!-- After processing it could look like:
3: Green
-->
Back to Top |
[FMP-CurrentSkip] |
What it does
[FMP-CurrentSkip] is replaced with the number of records
skipped from the beginning of the found set. This is
useful as a value to pass to the -Skip tag.
Syntax example(s)
Returns current record with -Skip instead of -RecID
using a link
<a href="FMPro?-DB=db.fp5&-Format=mdtl.hmt&-Max=1&-Skip=[FMP-CurrentSkip]&-findall">
View more details</a>
See also
-Skip
Back to Top |
[FMP-CurrentSort] |
What it does
Repeats the HTML between [FMP-CurrentSort] and [/FMP-CurrentSort]
for each sort argument that was part of the request
that created this page.
Syntax example(s)
Return information about the current sort using an HTML
file
Current sort order is:<br>
[FMP-CurrentSort]
Field: [FMP-SortFieldItem], Order: [FMP-SortOrderItem]<br>
[/FMP-CurrentSort]
<!-- After processing it could look like:
Current sort order is:
Field: First Name, Order: descend
Field: Last Name, Order: descend
-->
Other tags that are required
[/FMP-CurrentSort]
See also
[FMP-SortFieldItem], [FMP-SortOrderItem]
Back to Top |
[FMP-CurrentTime] |
What it does
[FMP-CurrentTime] is replaced with the current time.
Syntax
[FMP-CurrentTime: Format ]
Parameter(s)
First parameter (optional): Format. Use one of the following
reserved words:
Short - (default) returns the current time in the OS's
definition of a short time (e.g. 10:12 AM).
Long - returns the current time in the OS's definition
of a long time (e.g. 10:12:32 AM).
Syntax example(s)
Returns the current time using an HTML file
Current time is: [FMP-CurrentTime: short]
<!-- After processing it could look like:
Current time is: 10:12 AM
-->
Back to Top |
[FMP-CurrentToken] |
What it does
[FMP-CurrentToken] is replaced with the value of -Token
variable tag used to create the current page.
Syntax
[FMP-CurrentToken: Encoding ]
Parameter(s)
First parameter (optional): Encoding. Use one of the
following reserved words:
Raw - Don't perform any encoding
URL - Perform URL encoding
HTML - (default) Perform HTML encoding
Syntax example(s)
Returns the current token using an HTML file
Your last reply was [FMP-CurrentToken: HTML].
<!-- After processing it could look like:
Your last reply was sell.
-->
Up to nine tokens can be used by using a slightly different
syntax for the
token tags. The variable tag -Token can have an optional
token specifier of the form -Token.X
where X can be the characters 0 through 9. If no period
follows the -Token keyword then token
one is implied. To retrieve the value of a token the
FMP_CurrentToken will accept another
parameter that is a number, of value 0 through 9. If
there is no number parameter, but there
is a period, then token zero would be returned. CurrentToken
constant for the FMP-If tag
would then have an optional specifier that would look
like CurrentToken:3 if you want to
compare the contents of token three to something else.
Example format file snippet:
<!-- Pass the value of token three onto the next request
-->
<INPUT TYPE="HIDDEN" NAME ="-Token.3" VALUE ="[FMP-CurrentToken:
3]">
Tokens can be used on the right side of an FMP-If using
the intratag replacement syntax:
[FMP-If: CurrentToken:5.eq.{CurrentToken:6}]
<B>Token 5 equals token 6.</B>
[/FMP-If]
See also
-Token
Back to Top |
-DBClose |
What it does
Closes a database on the FileMaker host machine from
a remote browser.
The -DBOpen and -DBClose actions tags would only use
the -db variable tag for the name of the database and
the partial path before FMPro? in the URL to determine
on which database to apply the action. The database
administrator will have to have remote administration
privileges and the database to be closed must be in
the Web folder. A format file is required to be specified
in the URL in order for -DBOpen to be processed.
For security reasons, it is important to use the Remote
Administration Requires Password option, otherwise users
can close your database without an Administrator password.
Syntax example(s)
Close a database with a URL
HTTP://thehost.com/FMPro?-Db=Employees.fp5&-format=aFormatFile.htm&-DbClose
HTTP://thehost.com/asite/onlineordering/FMPro?-Db=main.fp5&-format=aFormatFile.htm&-DbClose
Other tags that are required
-DB, -format
See also
-DBOpen
Back to Top |
-DB |
What it does
Specifies the database that all processing of the request
will refer to.
Value is
Name of the database, including the extension if any.
The FileMaker Pro Web Companion uses only the name of
the database; do not include any path information. The
database must be open in FileMaker Pro.
Syntax example(s)
View a format file using a link
<a href="FMPro?-DB=Names.fp5&-Format=query.htm&-View">Take
me to a search page</a>
View a format file using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="Names.fp5">
<input type="hidden" name="-Format" value="query.htm">
<input type="submit" name="-View" value="View Search
Page">
</form>
Other tags that are required
Any action tag
Back to Top |
-DBOpen |
What it does
Opens a database on the FileMaker host machine from
a remote browser.
The -DBOpen and -DBClose actions tags only uses the
-db variable tag for the name of the database and the
partial path before FMPro? in the URL to determine on
which database to apply the action. The opening action
has the additional parameter -password specifying what
password to open the db with. The database administrator
must have remote administration privileges . The database
must be in the Web folder to be opened remotely. A format
file is required to be specified in the URL in order
for -DBOpen to be processed.
Syntax example(s)
Open a database with a URL
HTTP://thehost.com/FMPro?-Db=Employees.fp5&-format=formatFile.htm&-DbOpen
HTTP://thehost.com/FMPro?-Db=Employees.fp5&-format=formatFile.htm&-Password=secret&-DbOpen
HTTP://thehost.com/joessite/ordering/FMPro?-Db=main.fp5&-format=formatFile.htm&-DbOpen
Other tags that are required
-DB, -format
See also
-DBClose
Back to Top |
-Delete |
What it does
Deletes the record specified by -RecID.
The -RecID tag indicates which record should be deleted.
In order to delete a record, the Web user must have
Delete permission for the database.
Syntax example(s)
Delete a record using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&-RecID=4&-Delete">Delete
record with ID 4</a>
Delete a record using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="name.fp5">
<input type="hidden" name="-Format" value="results.htm">
<input type="hidden" name="-RecID" value="[FMP-CurrentRecID]">
<input type="submit" name="-Delete" value="Delete This
Record">
</form>
Other tags that are required
-DB, -RecID
See also
[FMP-CurrentRecID]
Back to Top |
-Img |
What it does
Returns an image specified by -DB, -RecID, and a field
name, or specified by -DB and an image key.
A Web user must have Browse permission in order to execute
this action.
An image key is a unique specifier to an image that
is in a FileMaker Pro database. Use the [FMP-Field]
tag to retrieve the image key from a container field.
Images stored in formats other than JPEG or GIF are
converted before being sent to a Web user.
Important Usually there is no need to use this tag directly;
the [FMP-Image] tag can be used to generate the correct
URL for any container field.
Syntax example(s)
Link to a page containing the image
<a href="FMPro?-DB=db.fp5&-RecID=11&pictures=&-Img">
Display the picture from record ID 11 and field name
"pictures"</a>
Display an image in a page by ID & field
<img src="FMPro?-DB=db.fp5&-RecID=[FMP-CurrentRecID]&pictures=&-Img">
Display an image in a page by image key
<img src="FMPro?-DB=db.fp5&key=[FMP-Field:pictures,url]&-Img">
Display an image the recommended way
<img src="[FMP-Image:pictures]">
Other tags that are required
-DB, -RecID, field name
See also
[FMP-Image], [FMP-CurrentRecID]
Back to Top |
-Dup |
What it does
Duplicates the record specified by -RecID.
The -RecID tag indicates which record should be duplicated.
To duplicate a record, the Web user must have Create
permission for the database.
Syntax example(s)
Duplicate a record using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&-RecID=6&-Dup">Duplicate
record with ID 6</a>
Duplicate a record using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="name.fp5">
<input type="hidden" name="-Format" value="results.htm">
<input type="hidden" name="-RecID" value="[FMP-CurrentRecID]">
<input type="submit" name="-Dup" value="Duplicate This
Record">
</form>
Other tags that are required
-DB, -RecID, - Format
See also
[FMP-CurrentRecID]
Back to Top |
-Edit |
What it does
Updates the record specified by -RecID by populating
the fields with the contents of any field name/value
pairs.
The -RecID tag indicates which record should be edited.
In order to edit a record, the Web user must have Edit
permission for the database.
Syntax example(s)
Edit a record using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&-RecID=13&Country=USA&-Edit">
Change the country of record ID 13 to USA</a>
Edit a record using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="names.fp5">
<input type="hidden" name="-Format" value="results.htm">
<input type="hidden" name="-RecID" value="[FMP-CurrentRecID]">
<input type="text" size=12 name="Country" value="Type
a country name here">
<input type="submit" name="-Edit" value="Edit This Record">
</form>
Other tags that are required
-DB, -RecID, field name
See also
[FMP-CurrentRecID]
Back to Top |
[FMP-ElseIf] |
What it does
[FMP-ElseIf] is replaced with the specified data if
the conditions of the [FMP-If] statement are not met.
Syntax example(s)
Generate a greeting unique to the locale of the user
[FMP-If: (Field:country.Eq.us).or.(Field:country.Eq.usa)]
Welcome citizen!
[FMP-ElseIf: Field:country.Eq.texas]
Howdy, Pardner!
[/FMP-If]
Other tags that are required
[FMP-If]
See also
[FMP-If]
Back to Top |
-ErrorFmtField |
What it does
Pulls error format file information from a field in
the database instead of an HTML file in the Web folder.
Value is
Field name that contains the HTML which will be used
to display the error message.
Syntax example(s)
HTTP://thehost.com/FMPro?-Db=file.fp5&-ErrorFmtField=error+format+field
&-Format=standardError.htm&-FindAny
Notes
If the field is a container field the field is empty
then the file specified in the -Format command will
be used instead.
See also
-Format, -FmtField, -MailFmtField
Back to Top |
-ErrNum |
What it does
-ErrNum takes either a range of error numbers or an
individual error number that triggers the use of the
format page specified in the -Error tag. Multiple -ErrNum
tag may be used to specify discontinuous ranges. If
no -ErrNum exists, then the current behavior is used.
Any error not listed in -ErrNum tags will be handled
by the default pages inside the Web Companion. Errors
related to finding and processing an -Error format page
will always be handle with the default pages.
Value is
Number value that you wish to trap for.
Syntax example(s)
HTTP://thehost.com/FMPro?-Db=file.fp3&-RecId=2&fname=14&-Error=err.htm&
-ErrNum=500-509&-Edit
Other tags that are required
-Error, -DB, any action tag
See also
-ErrorFmtField
Back to Top |
-Error |
What it does
Specifies the HTML format file to be used to generate
a response if any error occurs during the processing
of the action.
In the page you specify with this tag, you can test
for which error occurred by using the [FMP-If] tag with
CurrentError as the first parameter, or you can simply
display the error number by using [FMP-CurrentError].
Value is
Path and name to the format file to use to display the
error message.
Syntax example(s)
Attempt to create a new record using an HTML file, any
error takes you to the failure page
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="names.fp5">
<input type="hidden" name="-Format" value="success.htm">
<input type="hidden" name="-Error" value="failure.htm">
<input type="hidden" name="-RecID" value="[FMP-CurrentRecID]">
<input type="submit" name="-New" value="New Record">
</form>
Other tags that are required
-DB, any action tag
See also
-Format, [FMP-CurrentRecID], [FMP-If]
Back to Top |
[FMP-Field] |
What it does
[FMP-Field] is replaced with the contents of the specified
field.
The layout specified by the -Lay tag that was part of
the request that created this page must contain the
fields to be displayed. Related fields cannot be used
if the -Lay tag was not specified.
Syntax
[FMP-Field: Field name , Encoding ]
Parameter(s)
First parameter: The name of the field
Second parameter (optional): Encoding. Use one of the
following reserved words:
Raw - Don't perform any encoding
URL - Perform URL encoding
HTML - (default) Perform HTML encoding
Break - Perform HTML encoding and replace soft returns
with <br>
Syntax example(s)
Create an editable area for field data using an HTML
file
First Name: <input type="text" name="First Name" value="[FMP-Field:
First Name, Raw]">
Return field data using an HTML file
First Name: [FMP-Field: First Name]
<!-- After processing it could look like:
First Name: John
-->
Back to Top |
Field Name |
What it does
Field names are used to control find criteria or to
upload data to a record. This is not a tag.
Usually the name portion of a name/value pair to be
processed by FileMaker Pro is either a CDML action or
variable tag. When a value for a specific field needs
to be sent to FileMaker Pro, the name portion of the
name/value pair is the name of a field in the FileMaker
Pro database. Field names used in this manner should
not start with the hyphen (-) character or contain any
period (.) characters.
Name is
Name of the field in the database.
Value is
For the -New and -Edit tags, the value contains the
data to be uploaded into a record. Multiple occurrences
of a field allow the data to be put into separate repetitions
of a repeating field.
For the -Find tag, the value is a find request on the
specified field.
For the -Img tag, the first field name in the URL is
the name of the container field to retrieve the image
from. The value portion is ignored.
For all other action tags, these name/value pairs are
not needed.
Syntax example(s)
Find a record using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&color=red&-Max=1&-Find">Find
first red record</a>
Edit a record using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="names.fp5">
<input type="hidden" name="-Format" value="results.htm">
<input type="hidden" name="-RecID" value="[FMP-CurrentRecID]">
<input type="text" size=12 name="items" value="Enter
data for rep one">
<input type="text" size=12 name="items" value="Enter
data for rep two">
<input type="submit" name="-New" value="New Record">
</form>
Other tags that are required
-DB, any action tag
Back to Top |
[FMP-FieldName] |
What it does
[FMP-FieldName] is replaced with the name of the current
field when this tag is between the [FMP-LayoutFields]
and [/FMP-LayoutFields] tags.
Syntax
[FMP-FieldName: Encoding ]
Parameter(s)
First parameter (optional): Encoding. Use one of the
following reserved words:
Raw - Don't perform any encoding
URL - Perform URL encoding
HTML - (default) Perform HTML encoding
Syntax example(s)
Create a pop-up menu with all the fields on a layout,
using an HTML file
<select name="-SortField">
<option value="">-None- [FMP-LayoutFields]
<option>[FMP-FieldName: Raw] [/FMP-LayoutFields]
</select>
<!-- After processing, the HTML sent to the browser
could look like:
<select name="-SortField">
<option value="">-None-
<option>First Name
<option>Last Name
<option>Employee Number
</select>
-->
Other tags that are required
[FMP-LayoutFields], [/FMP-LayoutFields]
Back to Top |
-FindAll |
What it does
Finds all records and displays them using the specified
format file.
A Web user must have Browse permission in order to execute
this action. You can improve the perceived performance
of your Web database by using the -Max tag to limit
the number of records returned.
Syntax example(s)
Find all records using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&-Max=10&-FindAll">
First 10 records in the database</a>
Find all records using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="names.fp5">
<input type="hidden" name="-Format" value="results.htm">
<input type="hidden" name="-Max" value="all">
<input type="submit" name="-FindAll" value="Find All
Records">
</form>
Other tags that are required
-DB, -Format
See also
-Max, -Skip
Back to Top |
-FindAny |
What it does
Performs a find for a single random record. A format
file is used to display the record found.
A Web user must have Browse permission in order to execute
this action.
Syntax example(s)
Find any one record using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&-FindAny">Return
any record in the database</a>
Find any one record using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="names.fp5">
<input type="hidden" name="-Format" value="results.htm">
<input type="submit" name="-FindAny" value="Pick One!">
</form>
Other tags that are required
-DB, -Format
Back to Top |
[FMP-FindFieldItem] |
What it does
[FMP-FindFieldItem] is replaced with the field name
that was part of the find request that created this
page.
[FMP-FindFieldItem] must be placed between the [FMP-CurrentFind]
and [/FMP-CurrentFind] tags.
Syntax
[FMP-FindFieldItem: Encoding ]
Parameter(s)
First parameter (optional): Encoding. Use one of the
following reserved words:
Raw - Don't perform any encoding
URL - Perform URL encoding
HTML - (default) Perform HTML encoding
Syntax example(s)
Return the current find criteria using an HTML file
Current find request is:<br>
[FMP-CurrentFind]
Field: [FMP-FindFieldItem], Op: [FMP-FindOpItem] Value:
[FMP-FindValueItem]<br>
[/FMP-CurrentFind]
<!-- After processing it could look like:
Current find request is:
Field: First Name, Op: begins with Value: Joe
Field: Last Name, Op: equals Value: Doe
-->
Other tags that are required
[FMP-CurrentFind], [/FMP-CurrentFind]
See also
[FMP-FindOpItem], [FMP-FindValueItem]
Back to Top |
[FMP-FindOpItem] |
What it does
[FMP-FindOpItem] is replaced with the search operator
that was part of the find request that created this
page.
[FMP-FindOpItem] must be placed between the [FMP-CurrentFind]
and [/FMP-CurrentFind] tags.
Syntax
[FMP-FindOpItem: Format ]
Parameter(s)
First parameter (optional): Format. Use one of the following
reserved words:
Short - Returns the find operator in short format (i.e:
bw, cn, eq, ...)
Long - (default) Returns find operator in long format
(i.e. begins with, contains, equals, ...)
Display - Returns the find operator in the language
specified by the Web Companion Configuration
Syntax example(s)
Return the current find criteria using an HTML file
Current find request is:<br>
[FMP-CurrentFind]
Field: [FMP-FindFieldItem], Op: [FMP-FindOpItem] Value:
[FMP-FindValueItem]<br>
[/FMP-CurrentFind]
<!-- After processing it could look like:
Current find request is:
Field: First Name, Op: begins with Value: Joe
Field: Last Name, Op: equals Value: Doe
-->
Other tags that are required
[FMP-CurrentFind], [/FMP-CurrentFind]
See also
[FMP-FindFieldItem], [FMP-FindValueItem]
Back to Top |
-Find |
What it does
Submits a search request using defined criteria. A format
file is used to display the records found.
A Web user must have Browse permission in order to execute
this action. You can improve the perceived performance
of your Web database by using the -Max tag to limit
the number of records returned.
Syntax example(s)
Find a record using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&country=USA&-Max=1&-Find">Find
first USA record</a>
Find some records using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="names.fp5">
<input type="hidden" name="-Format" value="results.htm">
<input type="hidden" name="-Max" value="all">
<input type="text" size=12 name="Country" value="USA">
<input type="submit" name="-Find" value="Find Records">
</form>
Other tags that are required
-DB, -Format, field name
See also
-Max, -Skip
Back to Top |