TSC - For all your computer needs
You Provide the Problem, We Provide the Solution
Website Hosting Company Reviews Cheap Domain Names
Tips, Tricks and Coupons
Home
Services
Resources
Store


FileMaker CDML Reference

Page 1 Page 2 Page 3 Page 4 Page 5
Tag Name Description
[FMP-FindValueItem] What it does
[FMP-FindValueItem] is replaced with the value that was part of the find request that created this page.

[FMP-FindValueItem] must be placed between the [FMP-CurrentFind] and [FMP-CurrentFind] tags.

Syntax
[FMP-FindValueItem: 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-FindFieldItem], [FMP-FindOpItem]

Back to Top
-FmtField What it does
Pulls 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&-FmtField=error+format+field&-Format=standardError.htm&-FindAny

Notes
If the field is a container field, or the field is empty then the file specified in the -Format command will be used instead.


See also
-Format, -FmtField, -MailFmtField

Back to Top
-MailFmtField What it does
Specifies a field from which a format file can be used for the body of the email message instead of a file in the Web folder.

The format file can contain CDML replacement tags.

Value is
A text file to send as the body of the message.

Syntax example(s)
Send mail using a form action

<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="contacts.fp5">
<input type="hidden" name="-Format" value="displaypage.html">
<input type="text" name="-MailTo" value="Keith@Company.COM">
<input type="text" name="-MailCC" value="Dirk@Company.COM">
<input type="text" name="-MailBCC" value="Terry@Company.COM">
<input type="text" name="-MailFrom" value="Chris@Company.COM">
<input type="text" name="-MailSub" value="The Subject">
<input type="hidden" name="-MailHost" value="SMTP.Company.COM">
<input type="hidden" name="-MailFmtFIeld" value="mail format field">
<input type="submit" name="-View" value="Send Message">
</form>


Other tags that are required
-DB, -MailTo, -MailFrom, -MailSub, -MailHost, any action tag

See also
-MailCC, -MailBCC

Back to Top
-Format What it does
Specifies the HTML format file used to generate a successful response during the processing of the action.

Value is
Path and name to the format file to use to display the response.

Syntax example(s)
Find any one record using a link, and display that record in "results.htm"
<a href="FMPro?-DB=db.fp5&-Format=results.htm&-FindAny">Return any record in the database</a>

Find any one record using a form action, and display that record in "results.htm"
<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, any action tag

See also
-Error

Back to Top
-MailFormat What it does
Specifies a text format file used for the body of the email message.

This format file can contain CDML replacement tags.

Value is
A text file to send as the body of the message.

Syntax example(s)
Send mail using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="contacts.fp5">
<input type="hidden" name="-Format" value="displaypage.html">
<input type="text" name="-MailTo" value="Keith@Company.COM">
<input type="text" name="-MailCC" value="Dirk@Company.COM">
<input type="text" name="-MailBCC" value="Terry@Company.COM">
<input type="text" name="-MailFrom" value="Chris@Company.COM">
<input type="text" name="-MailSub" value="The Subject">
<input type="hidden" name="-MailHost" value="SMTP.Company.COM">
<input type="hidden" name="-MailFormat" value="mail.txt">
<input type="submit" name="-View" value="Send Message">
</form>

Other tags that are required
-DB, -MailTo, -MailFrom, -MailSub, -MailHost, any action tag

See also
-MailCC, -MailBCC

Back to Top
-MailFrom What it does
Specifies the email address of the person who is sending the message.

Value is
An email address.

Syntax example(s)
Send mail using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="contacts.fp5">
<input type="hidden" name="-Format" value="displaypage.html">
<input type="text" name="-MailTo" value="Keith@Company.COM">
<input type="text" name="-MailCC" value="Dirk@Company.COM">
<input type="text" name="-MailBCC" value="Terry@Company.COM">
<input type="text" name="-MailFrom" value="Chris@Company.COM">
<input type="text" name="-MailSub" value="The Subject">
<input type="hidden" name="-MailHost" value="SMTP.Company.COM">
<input type="hidden" name="-MailFormat" value="mail.txt">
<input type="submit" name="-View" value="Send Message">
</form>

Other tags that are required
-DB, -MailTo, -MailSub, -MailHost, -MailFormat, any action tag

See also
-MailCC, -MailBCC

Back to Top
[FMP-Header] What it does
The HTTP header of the page sent to the browser is replaced with the text between the [FMP-Header] and [/FMP-Header] tags. None of the text between the tags will appear in the HTML portion of the page.

The [FMP-Header] tag must be placed before the [FMP-ContentMimeType] and [FMP-SetCookie] tags in order for them to function properly. The [FMP-Header] tag will replace the current header entirely. Since these tags modify the header, their position is important.

One example of the use of a header would be to redirect a browser to a different HTTP server instead of displaying the formatted page. Consult RFC 2068, Hypertext Transfer Protocol -- HTTP/1.1 for more information about HTTP headers.

Syntax example(s)
Direct the user's browser to the FileMaker home page after processing the request
[FMP-Header]
HTTP/1.0 302 Moved Temporary
Location: http://www.FileMaker.com
[/FMP-Header]

Other tags that are required
[/FMP-Header]

Back to Top
-MailHost What it does
Specifies the address of the SMTP server host that will actually send the message.

Value is
Name or IP address of an SMTP mail host.

Syntax example(s)
Send mail using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="contacts.fp5">
<input type="hidden" name="-Format" value="displaypage.html">
<input type="text" name="-MailTo" value="Keith@Company.COM">
<input type="text" name="-MailCC" value="Dirk@Company.COM">
<input type="text" name="-MailBCC" value="Terry@Company.COM">
<input type="text" name="-MailFrom" value="Chris@Company.COM">
<input type="text" name="-MailSub" value="The Subject">
<input type="hidden" name="-MailHost" value="SMTP.Company.COM">
<input type="hidden" name="-MailFormat" value="mail.txt">
<input type="submit" name="-View" value="Send Message">
</form>

Other tags that are required
-DB, -MailTo, -MailFrom, -MailSub, -MailFormat, any action tag

See also
-MailCC, -MailBCC

Back to Top
[FMP-If] What it does
Along with the [FM-Else] and [/FMP-If] tags, the [FMP-If] tag controls what HTML is shown by the browser. The [FMP-Else] tag is optional.

Syntax
[FMP-If: LeftSide Operator RightSide ]
...HTML if condition is true...
[FMP-Else]
...HTML if condition is false...
[/FMP-If]

Parameter(s)
First parameter: The left side of the operator. Can be one of the following reserved words:

Boolean comparisons
CanDelete - Do password privileges allow for deleting records?
CanEdit - Do password privileges allow for editing records?
CanNew - Do password privileges allow creation of new records?
IsSorted - Is the database currently sorted?

Numeric comparisons
CurrentError - Returns the current error number. See FileMaker Pro error code numbers, in the develop guide section of this database, for possible values
CurrentFoundCount - Returns how many records are in the found set
CurrentMax - Returns the current -Max value, which describes how many records should be shown
CurrentRecordCount - Returns how many records are in the database
CurrentRecordNumber - Returns the current record number
CurrentSkip - Returns how many records were skipped to the beginning of the range
RangeEnd - Returns the record number of the last record in the range
RangeSize - Returns the number of records that were actually shown in the range
RangeStart - Returns the record number of the first record in the range

Text comparisons
ClientPassword - Returns the client's password
ClientType - Returns the type of browser the Web user is using
ClientUsername - Returns the client's user name as typed in by the Web user in the authentication dialog box
CurrentAction - Returns the current action (e.g.: Delete, New)
CurrentCookie: Cookie Name - Returns the value of the named cookie
CurrentDatabase - Returns the current database name
CurrentFormat - Returns the name of the current format file
CurrentLayout - Returns the current layout name
CurrentToken - Returns the current token value

Text or numeric comparisons depending on field type
Field: Field Name - Name of a field to compare with

Value list comparisons
ValueListItem - Returns the current value list item

Date/time comparisons
CurrentDate - Returns the current date in short format
CurrentDay - Returns the current day name in short format
CurrentTime - Returns the current time in short format

Address comparisons
ClientAddress - Returns the domain address
ClientIP - Returns the IP address

Second parameter: The comparison operator
.eq. - equals
.neq. - not equal to
.gt. - greater than
.gte. - greater than or equal to
.lt. - less then
.lte. - less than or equal to
.cn. - contains
.ncn. - does not contain

Third parameter: The right side of the operator, depends on the comparison type of the left side.

Boolean comparisons (only with .eq. and .neq. operators)
False
True

Numeric comparisons (only with eq, neq, gt, gte, lt, lte)
Field: Field Name - Name of a field to compare with, should be a number
Literal Numeric Value - A number

Text comparisons (all operators allowed)
Field: Field Name - Name of a field to compare with
Literal Value - Any literal text that does not contain a ] character (right square bracket)

Value list comparisons (all operators, except for Checked, which can only use eq)
Checked - Used with .eq. to test if the value list item should be checked
Field: Field Name - Name of a field to compare with
Literal Value - Any literal text that does not contain a ] character (right square bracket)

Date/time comparisons (only with eq, neq, gt, gte, lt, lte)
Literal Value - Proper date, day, or time literal in current OS's format

Address comparisons (only with eq)
List of Literal Value - list of address or IP numbers, with wild cards if wanted, separated by commas

Notes about literal values:
If specifying a literal value, FileMaker Pro treats everything from the end of the operator to the closing right square bracket (minus leading and trailing blanks) as the comparison value.
Don't enclose literal values in quotes. If you include quotes, they're treated as part of the comparison value.
Literal values are not case-sensitive and can include spaces within text or number values.

Syntax example(s)
Boolean example
Decide which HTML to send:
[FMP-If: CanDelete .eq. True]
Show the delete button...
[/FMP-If]

Address example
[FMP-If: ClientAddress .eq. keith.company.com]
Hi, Keith!
[/FMP-If]

Text example
[FMP-If: CurrentAction .eq. Delete]
[include: filename.htm]
[FMP-Else]
[include: anotherFile.htm]
[/FMP-If]

[FMP-If: First Name .eq. field: Nick Name]
How boring, your nick name is the same as your name.
[/FMP-If]

[FMP-If: ClientUserName .neq.]
Everyone who has entered a user name will see this message.
[/FMP-If]

Back to Top
[FMP-Image] What it does
[FMP-Image] is replaced with an image URL pointing to the picture in the specified field.

Usually used inside the HTML image (<img>) tag or anchor (<a>) tag as the URL to the picture.

Syntax
[FMP-Image: Field name ]

Parameter(s)
First parameter: The name of a container field

Syntax example(s)
Display a picture using an HTML file
<img src="[FMP-Image: pictures]">

Link to a picture using an HTML file
<a href="[FMP-Image: pictures]">View the image!</a>


See also
-Img

Back to Top
[FMP-Include] What it does
[FMP-Include] is replaced with the contents of another file, usually an HTML format file.

Syntax
[FMP-Include: Filename ]

Parameter(s)
First parameter: Name of the file to include.

Syntax example(s)
Include a file using an HTML file
[FMP-If: CurrentError .eq. 509]
[FMP-Include: requirefield.htm]
[FMP-Else]
[FMP-Include: othererror.htm]
[/FMP-If]

Back to Top
[FMP-IncludeField] What it does
[FMP-IncludeField] is replaced with the contents of a field, usually a text field that contains an HTML format file.

Syntax
[FMP-IncludeField: Fieldname ]

Parameter(s)
First parameter: Name of the field to include.

Syntax example(s)
Include a file using an HTML file
[FMP-If: firstName .neq. "bob" ]
[FMP-IncludeField: errorPage]
[FMP-Else]
[FMP-IncludeField: otherErrorPage]
[/FMP-If]

Back to Top
[FMP-InlineAction] What it does
[FMP-InlineAction] allows the processing of multiple CDML requests during the processing of a single format file. The [FMP-InlineAction] tag takes as its parameters the URL-like format of the name value pairs for a CDML request. All further processing of the format file then continues as if the inline request started the processing.
When the [/FMP-InlineAction] is processed the request that was in effect previously is restored. Any -Format tags are ignored in the request. [FMP-CurrentError] contains the error result number of the last [FMP-InlineAction]. Any FMP-ContentMIMEType or FMP-Header tags inside any [FMP-InlineAction] tags are processed as if they were not inside any [FMP-InlineAction] tags.

Syntax
[FMP-InlineAction: Intratags ]

Parameter(s)
First parameter: Intratags{intratag parameter}

Syntax example(s)
<!-- List the employees named Doe in the current database -->

[FMP-InlineAction: -db={CurrentDatabase}, -lay={CurrentLayout}, last name="doe", position="Software Engineer", -find] [FMP-Field: first name] [FMP-Field: last name] [/FMP-InlineAction]

<!-- Send a mail message if a cookie was never set -->
[FMP-If: CurrentCookie: hasseen .ne. yes]
[FMP-InlineAction: -db=dbname, -mailto=admin@ab.ca, -mailfrom=webserver@ab.ca,
-mailsub=New User, -mailhost=17.17.17.17, -mailformat=newuser.txt, -view]
[/FMP-InlineAction]

[/FMP-If]

<!-- Log page hits in another database -->
[FMP-InlineAction: -db=log.fp5, -lay=web, time="{CurrentTime}", date="{CurrentDate}",
page="This page!", browser="{ClientType}", ip="{ClientIP}", -new]
[/FMP-InlineAction]

Back to Top
[FMP-LayoutFields] What it does
Repeats the HTML between [FMP-LayoutFields] and [/FMP-LayoutFields] for all the fields on the layout specified by the -Lay tag that was part of the request that created this page.

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]

See also
-Lay, [FMP-FieldName]

Back to Top
-Lay What it does
Specifies the name of the layout that is used to control which fields are available and how they are displayed.

The layout is used to: bind value lists to fields, control which fields are available to be displayed, allow access to related data, set the number of repetitions displayed in a repeating field, and control which fields are listed by the [FMP-LayoutFields] tag.

Value is
Name of the layout to use. If no layout is given, then the layout is considered to contain all fields in the database (but not related fields).

Syntax example(s)
Find any one record using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&-Lay=Layout+One&-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="hidden" name="-Lay" value="Layout One">
<input type="submit" name="-FindAny" value="Pick One!">
</form>

Other tags that are required
-DB, any action tag

Back to Top
[FMP-Link] What it does
[FMP-Link] is replaced with a URL that points to the page it is on. The parameters can be used to remove portions of the URL it generates.

The link that is generated includes all the find and sort criteria that was used to generate the page this tag is on. This tag is a shortcut to the following series of CDML tags:

FMPro?-db=[FMP-CurrentDatabase]&
-format=[FMP-CurrentFormat]&
-lay=[FMP-CurrentLayout]&
[FMP-CurrentSort]
-sortfield=[FMP-SortFieldItem]&-sortorder=[FMP-SortOrderItem]&
[/FMP-CurrentSort]
[FMP-CurrentFind]
-op=[FMP-FindOpItem]&[FMP-FindFieldNameItem]=[FMP-FindFieldValueItem]&
[/FMP-CurrentFind]
-lop=[FMP-CurrentLOP]&
-max=[FMP-CurrentMax]&
-skip=[FMP-CurrentSkip]&
-token=[FMP-CurrentToken]&
-[FMP-CurrentAction]

Syntax
[FMP-Link: CharacterCodes ]

Parameter(s)
First parameter: A series of letters, in any order, representing the parts of the URL to omit.
d - omit database section of the url
r - omit format file section of the url
l - omit layout section of the url
s - omit sort criteria section of the url
f - omit find criteria section of the url
m - omit max section of the url
k - omit skip section of the url
t - omit token section of the url
a - omit action section of the url

Syntax example(s)
Change to a page using all the same criteria except for the format file, using a link
<a href="[FMP-Link: ra]&-Format=AltHitList.htm&-Find">
Alternate hit list</a>

<!-- After processing, the HTML sent to the browser could look like:
<a href="FMPro?-db=curdb.fp5&-lay=list&-sortfield=size&-sortorder=descend&
-op=eq&color=red&-max=10&-skip=15&-token=CD1343&-Format=AltHitList.htm&-Find">
Alternate hit list</a>
-->

Back to Top
[FMP-LinkFirst] What it does
The HTML between [FMP-LinkFirst] and [/FMP-LinkFirst] is replaced with a link to the first range of records based on the -Max value used to create the current page.

The link that is generated includes all the search and sort criteria that was used to generate the page this tag was on. The text between the two tags is not displayed if the first record is being displayed.

Syntax example(s)
Display first set of records using an HTML file
[FMP-LinkFirst]First set of records.[/FMP-LinkFirst]

See also
-Max, [FMP-LinkNext], [FMP-LinkLast], [FMP-LinkPrevious]

Back to Top
[FMP-LinkLast] What it does
The HTML between [FMP-LinkLast] and [/FMP-LinkLast] is replaced with a link to the last range of records based on the -Max value used to create the current page.

The link that is generated includes all the search and sort criteria that was used to generate the page this tag was on. The text between the two tags is not displayed if the last record is being displayed.

Syntax example(s)
Display the last set of records using an HTML file
[FMP-LinkLast]Last set of records.[/FMP-LinkLast]

See also
-Max, [FMP-LinkFirst], [FMP-LinkNext], [FMP-LinkPrevious]

Back to Top
[FMP-LinkNext] What it does
The HTML between [FMP-LinkNext] and [/FMP-LinkNext] is replaced with a link to the next range of records based on the -Max and -Skip values used to create the current page.

The link that is generated includes all the search and sort criteria that was used to generate the page this tag was on. The text between the two tags is not displayed if the last record in the found set is being displayed.

Syntax example(s)
Display the next set of records using an HTML file
[FMP-LinkNext]Next set of records[/FMP-LinkNext]

See also
-Max, -Skip, [FMP-LinkFirst], [FMP-LinkLast], [FMP-LinkPrevious]

Back to Top
[FMP-LinkPrevious] What it does
The HTML between [FMP-LinkPrevious] and [/FMP-LinkPrevious] is replaced with a link to the previous range records based on the -Max and -Skip value used to create the current page.

The link that is generated includes all the search and sort criteria that was used to generate the page this tag was on. The text between the two tags is not displayed if the first record in a found set is being displayed.

Syntax example(s)
Display the previous set of records using an HTML file
[FMP-LinkPrevious]Previous set of records[/FMP-LinkPrevious]

See also
-Max, -Skip, [FMP-LinkFirst], [FMP-LinkLast], [FMP-LinkNext]

Back to Top
[FMP-LinkRecID] What it does
[FMP-LinkRecID] is replaced with a URL to a specific record in a database.

The link that is generated includes all the search and sort criteria that was used to generate the page this tag was on.

Syntax
[FMP-LinkRecID: Format=Pathname , Layout=Layout Name ]

Parameter(s)
First parameter: Path to the format file to use in the link.

Second parameter (optional): Name of a layout to use in the link.

Syntax example(s)
Display a specific record using a link
<a href="[FMP-LinkRecID: format=Detail.htm, layout=detail]">
More detail</a>

<!-- After processing, the HTML sent to the browser could look like:
<a href="FMPro?-db=curdb.fp5&-format=Detail.htm&-lay=detail&-recid=0A&-find">
More detail</a>
-->

Back to Top
[FMP-Log] What it does
[FMP-Log] is replaced with the text specified as the parameter and written to the info log file.

Syntax
[FMP-Log: someText ]

Parameter(s)
The text you want written into the info log file.

Syntax example(s)
Put some text in the info log file

[FMP-Log: the search.htm page was accessed]

Back to Top
-LOP What it does
Combines the find criteria as an AND or OR find request.

Value is
Either AND or OR. If the -LOP variable tag is not used, then the find request is assumed to be an AND request.

Syntax example(s)
Find a record using a link
<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&Country=USA+UK&-LOP=or&-Find">Find United states of America or United Kingdom records</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="-LOP" value="OR">
Enter a country and click Find to see the results.<br>
<input type="text" size=12 name="Country" value="USA UK">
<input type="submit" name="-Find" value="Find">
</form>

Other tags that are required
-DB, -Find, -Format, field name

See also
-Op

Back to Top
-Max What it does
Specifies the maximum number of records that should be returned per page.

Value is
A number from 1 thru 2147483647, or the word "All". The default value is 25.

Syntax example(s)
Specify the maximum number of records using a link
<a href="FMPro?-DB=Contacts&-Format=format.html&-Max=10&-FindAll">First 10 Records</a>

Specify the maximum number of records using a form action
<form action="FMPro" method="post">
<input type="hidden" name="-DB" value="contacts.fp5">
<input type="hidden" name="-Format" value="format.html">
<input type="hidden" name="-Max" value="10">
<input type="submit" name="-FindAll" value="First 10 Records">
</form>

Other tags that are required
-DB, -Format, -Find or -FindAll

See also
-Skip

Back to Top
-ModID What it does
Used to detect record modification collisions in -Edit requests. If the ID does not match, error code 306 (Record modification ID does not match) is returned.

Value is
An email address.

Syntax example(s)
Make sure when updating the country, no one else changed it

<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="HIDDEN" NAME="-ModID" VALUE="[FMP-CurrentModID]">
   <INPUT TYPE="TEXT" NAME="Country">
   <INPUT TYPE="SUBMIT" NAME="-Edit" VALUE="Edit This Record">
</FORM>


Other tags that are required
-Edit, [FMP-CurrentRecordID]

See also
[FMP-CurrentRecordID], [FMP-CurrentModID]

Back to Top
Page 1 Page 2 Page 3 Page 4 Page 5


Home Contact TSC About TSC Polyphonic Ringtones Site Map
 

Copyright 2004-2006 TSC
No copying or reproduction of any portion of this site without written consent from TSC