Other Custom Web Publishing Commands and Parameters

 <  Day Day Up  >  

In addition to the commands covered so far, XSLT-CWP has a lengthy list of other commands and parameters that you can pass as part of the query string. This section lists and explains them briefly .

Other Query Commands

As you know, each Custom Web Publishing URL contains a query string, and that query string can supply at most one database command. Commands covered so far include -find , -findall , -delete , -new , and -edit . Commands are supplied as a single name with no associated value. Table 23.3 contains the full list.

Other Query Parameters

In addition to a single database command, Custom Web Publishing URLs can contain other parameters. Some are mandatory, such as -db , and ( generally ) -lay and -grammar . Others, such as -lop and -sortfield , are particular to specific commands. Table 23.4 shows a full list.

Table 23.4. Other Custom Web Publishing URL Parameters

Parameter Name

Parameter Effect

-db

Name of the database on which to act. Mandatory for all commands except for -dbnames and -process . Do not include a filename extension (such as .fp7) when using this parameter.

-encoding

Use this to specify the encoding for an XSLT stylesheet.

-field

Use the -field parameter with the name of a container field to request the contents of the container field.

fieldname

Use plain unadorned field names as query parameters when sending data for use with the -new , -find, and -edit commands. See "Performing Specific Searches with CWP URLs," earlier in this chapter.

Fieldname .op

Sets the comparison operator for fieldname when performing a search. (See the table of operators earlier in this chapter.)

-grammar

For XSLT stylesheets, specifies the grammar of the underlying XML.

-lay

Specifies which layout (and hence which table context) to use for the request. Mandatory with all commands except “process , “dbnames , “layoutnames , and “scriptnames .

-lay.response

Enables you to use one layout for processing the command contained in a URL, and a different layout for generating the XML that comprises the response. For example, you might want to process your request (an Add, say) via a layout with certain hidden fields on it, but process the response via a layout that omitted those fields. Data could thus be added to the hidden fields, but that hidden data would then be omitted from the response.

-lop

Used with the -find command, specifies whether to treat the search as an "and" search or an "or" search.

-max

Used with the -find command, specifies the maximum number of records to return. Sending a parameter of -max=all permits all records to be returned. (This is the default.)

-modid

FileMaker's modification ID is an internal number that increments every time a record is changed. Use the -modid parameter to ensure that the record you're editing has not been edited since the time you last checked the modification ID. This is useful for prohibiting different users' changes from overwriting each other.

-recid

Specifies which record should be affected by a given action. This parameter is mandatory with -edit , -delete, and -dup , and can also be used with -find .

-script

Use this parameter to run a FileMaker script during the processing of the request. By default the script runs after the query command and any sorting have occurred. For example, to run a script in your FileMaker solution after each new record is created, you can create a URL with the -new command that also includes the -script parameter for that "post-creation" script.

-script.prefind

If your command URL involves any kind of find request, use this parameter to request a script to be run before the specified search takes place.

-script-presort

If your command URL involves any kind of find request and a sort , use this parameter to request that a script be run after the specified search takes place, but before sorting.

-skip

Used with the various search commands, specifies that records should be returned starting elsewhere than at the first record. If you specify -skip=10 , the records are returned starting with the eleventh record.

-sortfield.[1-9]

Specify any of up to nine different fields to sort by.

-sortorder.[1-9]

For a given sort field, specify whether it should sort ascending or descending.

-styletype

Used in conjunction with -stylehref . Use these two parameters to specify a client-side stylesheet for additional processing. The most common choices would likely be CSS and XSLT. For these choices, you would specify -styletype=text/css or -styletype=text/xsl .

-stylehref

Use this in conjunction with -styletype to specify the location of a stylesheet for client-side processing. Note that this option and the previous one are effective only when the user 's client (generally a browser) supports some form of client-side stylesheet processing.

-token.[string]

Use to pass additional data from one stylesheet to another. See "Using Tokens to Share Data Between Stylesheets," earlier in this chapter, for more detailed information.


 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net