• No results found

DataDesigner FAST Pack

N/A
N/A
Protected

Academic year: 2021

Share "DataDesigner FAST Pack"

Copied!
82
0
0

Loading.... (view fulltext now)

Full text

(1)

Contents 1

DataDesigner FAST Pack

Copyright © 2003 SoftPress Systems Limited. All Rights Reserved. Any rights not expressly granted herein are reserved. Freeway is a trademark of SoftPress Systems Limited. SoftPress is a trademark of SoftPress Systems Limited which is registered in some countries. FileMaker is a registered trademark of FileMaker, Inc. Apple, and Macintosh are registered trademarks of Apple Computer. All other company and product names are the trademarks or registered trademarks of their respective owners.

IN NO EVENT WILL SOFTPRESS SYSTEMS LIMITED, OR ITS DEVELOPERS, DIRECTORS, OFFICERS, EMPLOYEES, OR AFFILIATES BE LIABLE TO YOU FOR ANY CONSEQUENTIAL, INCIDENTAL, OR INDIRECT DAMAGES INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, AND THE LIKE

ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF SOFTWARE, DOCUMENTS, PROVISION OF OR FAILURE TO PROVIDE SERVICES, OR INFORMATION REFERRED TO IN THIS DOCUMENT, EVEN IF SOFTPRESS OR AN AUTHORISED SOFTPRESS REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME US STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE

LIMITATIONS MAY NOT APPLY TO YOU.

(2)

Contents

DataDesigner FAST Pack ...1

Contents... 2

Introduction... 4

What is Dynamic Publishing?... 4

Some Basics... 4

Key Terms... 7

Dynamic Publishing with FileMaker ... 8

How Dynamic Publishing Works ... 9

What does DataDesigner Do? ... 10

Working with FileMaker... 12

Hosting ... 12

Creating Pages for FileMaker to Serve ... 13

Configuring FileMaker... 14

Establishing a TCP/IP Connection to FileMaker... 16

Previewing... 16

CDML and DataDesigner ... 18

Getting Details of Databases from FileMaker ... 20

Open Databases in FileMaker ... 20

Get Database... 20

Updating when Databases have Changed... 22

Where the Information is Stored... 22

Displaying Values (FM-Value) ... 25

Field Values... 25

Dynamic Requests ... 29

Link Requests... 29

FM-Link ... 30

Form Requests ... 36

FM-Form... 36

FM-Extras Actions... 44

Extending Dynamic Requests ... 44

FM-ExtraEmail ... 44

FM-ExtraErrors ... 45

FM-ExtraFields ... 46

FM-ExtraSort ... 48

FM-ExtraTokens ... 49

FM-Form... 50

More about Forms FM-Input ... 52

Multiple Forms on a Page... 52

FM-Input... 52

How to show existing values... 57

Search Forms ... 58

(3)

Contents 3

FM-SearchOp ...60

Working with Images...63

FM-Image...63

FM-Link ...63

FM-Block ...65

FM-LinkRecID...69

FM-LinkRange...69

Working with Portals...71

Accessing Fields in a portal ...71

FM-LinkPortal ...72

Conditionals...74

FM-If ...74

Working with Tokens...76

FM-ExtraToken...76

Beyond DataDesigner...80

Overriding Action Settings...80

Mark Up ...80

Includes ...80

SourceCode Snooper ...81

Credits and Acknowledgements ...82

(4)

Introduction

What is the DataDesigner FAST Pack?

The DataDesigner FAST pack is a suite of Freeway Actions that assist and simplify the creation of Freeway Sites that are dynamically published using FileMaker.

What is Dynamic Publishing?

Most Web sites are static – that is to say that their content won’t change unless the Webmaster makes changes to the HTML and uploads them. If you were to create a shop with ten products, you would need to create one page per product in the Freeway document and upload those. Should you wish to

update a product, add a new one, or delete one that is no longer available, you would need to load the Freeway document, make the changes and then upload the modifications to the server. This may not seem too hard a task, but when you consider a site with 100, 1,000 or even 1,000,000 products, it is obvious that using this method would make it very difficult to maintain.

A dynamic site is one where the server inserts the content into a template.

Instead of one product per page, you would design one page for all the

products, leaving slots for the server to insert the content later. Whilst you can not see the content in Freeway, when you preview the site via a server, these slots will be filled in with content from the database. To change content, you simply edit the database and the new products are available on the site

instantly. This is how sites like Amazon, which have inventories of millions of products, keep their pages up to date.

In Freeway, you will be creating the slots using DataDesigner, which is a FAST Pack suite of Actions. These generate the code necessary to get data from a FileMaker database and insert it into your Web page. All you need to do is place them on the page and tell Freeway, via the Actions Palette, which fields to use. The Actions and the server will then do the rest for you.

DataDesigner extends the ethos of Freeway. You really won’t need to worry about writing code to get a database driven site up and running. However, due to the nature of publishing dynamic sites, we do advise you to look at CDML (the underlying language used by FileMaker) to help you better understand the mechanics of the system you are using. FileMaker have given us permission to include their CDML Reference files with this FAST Pack.

Some Basics

It is very likely that you are new to dynamic Web site publishing, so you will need to be familiar with some basics that will help you get off to a flying start.

(5)

Introduction 5 This manual assumes a working knowledge of FileMaker, so we will be making reference, but not providing full instructions for that product. However, we hope that this manual will help you get up and running in a short period of time.

Previewing

Previewing a site in Freeway is simple – do a choose Preview in the File menu and select your browser, and you will see your content. This method shows you the file directly in the browser. However, you will not be able to preview your dynamic site like this because it has to be processed by a server. As FileMaker has its own server, you can use this by typing in a URL into your browser, which may look something like this:

http://127.0.0.1:591/index.html

Browsing a FileMaker served site using the 127.0.0.1:591 URL.

Likewise, users of Mac OS X can access their sites using Rendezvous, using a URL similar to this one:

http://yourRendezVousName.local:591/index.html

(6)

This page is served by Filemaker on a Machine named “Ravenclaw” using Rendezvous

Allow Space to Grow

Dynamic content will vary in size. Some content will be quite short; other content will be quite long. You have no way to know about this in advance, so forward planning is necessary. When inserting dynamic text content into the site, be sure to reserve enough vertical space by increasing the height of the containing text box. This will stop content below the text being pushed further down the page.

It may not look much, but the FM-Field Action will generate much more text than it appears to occupy in Freeway. Allow it vertical space to grow.

Not So WYSIWYG

One of Freeway’s major strengths is the WYSIWYG interface. With dynamic site creation, you will lose some of this, as the content is no longer held locally in Freeway. Your design will have blank areas, with Actions telling you that there will be content in that space when FileMaker serves the page.

(7)

Introduction 7 Whilst this can be a little disconcerting to anyone new to dynamic site

authoring, you will soon get used to it. It may help to design a static page with all the elements in place first (including product images and dummy text) to get the design right, and then change the elements to DataDesigner Actions a bit at a time, checking the finished product on the server. Eventually, this will

become second nature to you, though you may need to mock up some dummy pages to show your client what the pages should look like when you get

confident enough to skip the initial design phase.

Key Terms

This manual uses some key terms that are defined here. If you are familiar with FileMaker or working with other kinds of dynamic sites, you will already have come across some of these.

CDML

Claris Dynamic Markup Language – the scripting language that tells FileMaker what to do and how to present the information.

Dynamic Requests

“Dynamic Request” is a term used in this documentation to name the system by which instructions are sent to the FileMaker server. There are two methods that do this – by appending the instructions to a link, or by sending them via on-line forms. As both these methods vary in their terminology, but perform much the same function within the FileMaker system, we are using one term to cover both real world systems.

Form Request

Using a form to send commands to the FileMaker server.

Link Request

Using a link to send commands to the FileMaker server.

Query

The part of a link that carries various pieces of information that the server will need to achieve a task. These follow a question mark in the URL.

E.g.

http://ravenclaw.local:591/FileMaker/gallery/FMPro?- db=pictures.fp5&-format=picture.html

Action Tag

An Action tag tells CDML what to do, such as searching a database.

E.g.:

<input type=hidden name="-find">

(8)

This tells FileMaker that it should search for records in the database.

Variable Tag

A variable tag tells FileMaker how to execute the Action. You will need to tell it what database to use, what fields to search on and so forth.

E.g.:

<input type=hidden name="-db" value="pictures.fp5">

<input type=hidden name="-max" value="5">

These two variable tags tell FileMaker to use the database named pictures.fp5 and to display a maximum of five records on the results page.

Record Set

A record set is a collection of data that is typically returned by a database when a search is executed. When looking through the results of a search on an Internet search engine, you are looking at the output from a record set returned by the search engine’s database.

Replacement Tag

A Replacement tag replaces the CDML with HTML comprised of data returned by FileMaker. So data returned by a search result will replace the CDML telling the FileMaker where to put the data.

E.g.:

<img src="[FMP-image: SmallImage]" border=0 alt="[FMP-field: Title]">

In this instance, the [FMP-image: SmallImage] will be replaced by an image URL, allowing a picture to be displayed.

Dynamic Publishing with FileMaker

FileMaker has a built-in Web server allowing it to serve pages both statically and dynamically. This means that FileMaker can act as a Web server, and can potentially insert data from database files as the Web pages are served to a browser. So, for example, you can add things like product costs, sales figures, etc. into your Web pages.

It is also possible to send information to FileMaker, (for example from values that you enter into forms) and change or add to the data within your database.

In the simplest case, this means that that you can create a Web front-end for your database where adding and deleting records is done. Using these techniques you can create far more complex solutions that do things like log time sheets, provide specific information on products that your users want and many other tasks.

(9)

Introduction 9

How Dynamic Publishing Works

With any process involving a server, you need to tell it what to do and when.

You also need to tell it what to do with any data returned. This could be as simple as displaying a list of results returned by a search. To make the FileMaker server get information from a database, you need to tell it what information to get, how to get it, and what to do when the information is retrieved. There are many server side languages for this kind of task.

DataDesigner works specifically with FileMaker servers and aids greatly in the generation of the specific code that they need to function.

To understand the mechanics of how Dynamic Publishing works you will need to look at some HTML. However, you will not need to deal with the HTML or much of the language that is used to communicate with FileMaker when you use Freeway and DataDesigner. The HTML fragments presented here are just a vehicle for explaining how Dynamic Publishing works.

Dynamic Web publishing relies on the Web server interpreting special tags and converting these into HTML when the page is served.

Consider the following HTML fragment

<html>

<head>

<title>Test Page</title>

</head>

<p>date: 22/11/02

</html>

If you look at it in a browser you will see a page that displays a date:

This date is fixed. Every time the page appears in the browser the date will be 22/11/02. If you want the date to reflect the current date then you will have to change the file every day.

(10)

If you want to show today’s date using dynamic publishing you would add a special tag into the HTML that means today’s date. The Web server will read your file, but when it comes across the special tag meaning “today’s date” it will substitute the text that is the current date in its place.

When FileMaker is serving a dynamic page and comes across the text [FMP- CurrentDate] in a file that it serves, it will substitute the current date. So the dynamic form of your HTML would look like this

<html>

<head>

<title>Test Page</title>

</head>

<p>date: [FMP-CurrentDate]

</html>

When Filemaker serves this page, it sends the following HTML to your browser.

<html>

<head>

<title>Test Page</title>

</head>

<p>date: 22/11/02

</html>

This is a very simple example, but it illustrates how dynamic publishing works.

Filemaker has a rich set of tags that allow powerful dynamic sites to be created.

What does DataDesigner Do?

To generate dynamic sites served by FileMaker additional code must be added in the HTML that Freeway generates. Your Freeway document will have to be edited in such a way that additional tags (CDML tags) appear in the output. It is completely possible to do this through techniques like adding markup,

carefully naming fields etc. but the process is mechanical, fiddly and prone to errors.

DataDesigner will take the tedium out of this level of working. It will take a snapshot of the fields, files and layouts in the databases that you work with. It will then present this information in a user interface that allows you to select commands and references to your database from menus. It will identify the values that you need to set, and will properly manage the dynamic links between pages. The resulting code will be inserted in the correct places leaving you with the design and styling of the site to concentrate on.

(11)

Introduction 11 Dynamic Web sites require additional CMDL tags to be inserted into your Web page. These tell FileMaker how to process the data you sent it. It is possible to add this code manually, but DataDesigner simplifies it in the following ways.

1 Adds the CDML in the appropriate places.

2 Provides lists of CDML actions and variables to choose from.

3 Has details of Fields and layouts that exist within your Database.

4 Maintains links within your Freeway Document.

For the main part DataDesigner will provide a simple user interface that will allow you to choose from menus that makes the bread-and-butter work of database programming very straightforward. However CDML is a programming language with a wide range of expressions and expressive capabilities. To facilitate this complexity the DataDesigner Actions always provides for the possibility that you will want to add your own code, or customize the CDML that it generates.

(12)

Working with FileMaker

To do dynamic publishing with FileMaker, FileMaker has to be act as a Web server. During development you will almost certainly need a copy of FileMaker with relevant databases for your development and testing. You will need a copy of FileMaker so that

1 DataDesigner can acquire details of the databases.

2 FileMaker can act as a Web server during development and testing.

This section describes how to get a local copy of FileMaker working as a web server with Freeway. If you are already using FileMaker as a Web server you will be able to skip much of this.

Hosting

For users to be able to access your finished site it will have to be hosted on a machine running FileMaker with your databases loaded.

Local Hosting

If you have an intranet and only need the database to be available within that you only need a machine running FileMaker to be generally available on the network. All members of the network will be able to access your database by entering the web-address of that machine. FileMaker 6 imposes restrictions on the number of people who can view pages served depending on the version running. FileMaker Pro 6 limits you to 10 IP addresses in any 24-hour period.

FileMaker Unlimited 6 allows access by any number of IP Addresses, and is the version that should be used if you are serving your database to the Internet or via an Intranet to more than 10 machines. At time of writing, it is unknown how these issues will be handled by future versions of FileMaker. Please check your FileMaker documentation for more information.

If your network is connected to the Internet depending on how that connection is managed it may be possible to configure your firewall and router so that it is visible to the outside. You will need to check with your network administrator to determine how to do this. It is likely that you will need to access your FileMaker server via port 591, like this:

http://www.yourdomainname.com:591/index.html

Remote Hosting

Most web sites are remotely hosted by an organization (an ISP) that specializes in hosting Web sites. To have your FileMaker Web site hosted you will have to make an arrangement with a company that hosts FileMaker Web sites. An easy way to find details of companies that do this is from FileMaker’s Web site http://www.filemaker.com

(13)

Working with FileMaker 13 When you get a hosting agreement your service provider should give you

details of what you need to do to upload and maintain the FileMaker database that is present on their server.

Creating Pages for FileMaker to Serve

FileMaker serves pages from the ‘Web’ folder that is next to your FileMaker application.

You will have to publish into this folder. You can do this by either setting the site folder when you create your Freeway document or by setting it when you first publish, or through the site folder Document Setup. You should note that if you create a document from a template you will have to set the site folder through the Document Setup dialog.

1 Create a new document, or open an existing document in Freeway.

2 Ensure that you can identify the file name of the Home Page that you want FileMaker to serve by default. You will need this when you configure FileMaker.

Tip: It is generally a good idea to change the file that is your home page to index.html or home.html that way you can easily identify your home page.

3 Either Set the Site Folder to the Web folder that is next to your copy of FileMaker when you create your document

4 Select Document Setup from the File menu.

5 Click on the Site Folder button.

6 Locate the Web folder that is next to your copy of FileMaker.

Tip: some configurations of Mac OS X do not allow you to modify folders outside of your Home folder. If this is the case, ask your System Administrator to set up an alias to a folder in your Home directory and publish your

Filemaker sites there.

(14)

The Web Folder with an alias to a folder called FileMaker in the user’s folder. The index.html page has a link to the folder in the User folder like this: FileMaker/index.html

Configuring FileMaker

FileMaker needs to be configured to be able to publish Web pages. You should receive details of how to do this with your copy of FileMaker, however brief instructions are included here for completeness.

1 Publish your Freeway Site into the web folder next to your FileMaker application.

2 Launch FileMaker

3 In Filemaker select the Application Preferences option from the Preferences pop-out menu on the Edit menu.

4 Select the ‘Plug-Ins’ tab, to bring up the preferences for the plug-ins.

5 Make sure that the Web Companion Plug-In is active. The Web Companion Plug-In is the FileMaker extension that is responsible for serving up Web pages. You make it active by checking its Enabled

(15)

Working with FileMaker 15 checkbox.

6 When you have enabled the Plug-in the Configure button will become enabled. Click on this.

7 In the configuration dialog for the Web Companion, select your home page of your site and click ok. You also have the chance to edit the TCP/IP Port Number for the FileMaker database to work through. By default, this is port 80 (the standard http request port) if you are using Web sharing on Mac OS X, then FileMaker’s server will clash with this. It is a good idea to change the TCP/IP Port Number to the

recommended FileMaker port number 591. You will then need to add this number to your URL in this format http://127.0.0.1:591 or

http://www.myfilemakerserver.com:591. If you have a Firewall active, allow access to port 591.

(16)

Establishing a TCP/IP Connection to FileMaker

For FileMaker to act as a Web server you have to connect to it using TCP/IP. If you are already on a TCP/IP network you will be able to connect using your machine’s IP number. You can discover this number from the network settings of your machine. If you are running OSX you will be able to connect to

FileMaker by using the loop-back IP number 127.0.0.1 or your Rendezvous address. If you have defined a port number other than 80 in the Web

Companion Configuration window, you will have to include this port number (e.g. 591) like this: http://127.0.0.1:591

You also need to have FileMaker running with your database loaded.

Previewing

To preview a dynamic database you will have to get FileMaker to serve your Web pages. If you do not do this and use the Preview option on the File Menu you will look at your pages statically.

1 Select Publish on the File menu to publish your site.

2 Launch your Browser of choice.

(17)

Working with FileMaker 17 3 Enter the IP number of your machine, or the loop-back IP number of

127.0.0.1:591

4 Navigate to the page(s) that you want to preview.

Tip: When developing a site and the dynamic part seems suddenly dead for no apparent reason, check that you have not used Preview from the File menu by mistake. You will normaly find a lot of code visible in the browser if you do this anyway.

(18)

CDML and DataDesigner

The dynamic component of Web pages is written in a language called CDML.FileMaker have a reference of CDML that is supplied as a FileMaker database. This lists all the tags that FileMaker understands and is included with the DataDesigner FAST Pack. This reference is included with DataDesigner.

What is CDML?

Claris Dynamic Markup Language (CDML) is the language used to

communicate to the database through FileMaker. It operates through a series of tags and queries to the database. A typical piece of CDML would look like this:

<img src="[FMP-image: SmallImage]" border=0 alt="[FMP-field: Title]">

The CDML is contained within a standard HTML img tag. In this case, the image will be retrieved from a database field named “SmallImage” and the alt text will come from the Title field in the database. The FileMaker server will substitute these blocks with the image reference and some text.

Using DataDesigner, you won’t need to worry about the CDML as the Actions do all the work for you.

What are CDML Tags?

CDML tags are commands that tell FileMaker how to access the database and what to do with the results. For example, you may want to loop through a set of results from a search. The following piece of CDML and HTML illustrate this:

[FMP-record]<tr>

<td width=272 valign=middle>

[FMP-field: Title, HTML] </p>

</td>

</tr>[/FMP-record]

In this instance, we are looping through a set of records that have been obtained from a search query, encompassing a table row as we do so. Each new row will display a new record from the search results. In this case, displaying the Title field from the database. The [FMP-record] [/FMP-record]

tag pair does the looping.

CDML tags control how the database data is handled before the page is served.

You can, for example, page the number of records returned, and provide

“Next” and “Previous” buttons so that people can step through results, rather than getting them all at once. This is very handy (as well as convenient) if your search returns hundreds of records. You can even allow the end user to select how many records they get shown in any one page.

(19)

CDML and DataDesigner 19 Whilst you could hand-code this in Freeway using Markup blocks,

DataDesigner will do this for you much faster and more accurately. This allows you to allocate more time to the design and styling of the site, rather than spend it all on typing code. In fact, you will find that DataDesigner will enable you to produce the lion’s share of the high-end functionality in a fraction of the time it would take you to write the CDML code by hand.

(20)

Getting Details of

Databases from FileMaker

DataDesigner communicates with FileMaker using AppleScript. All the DataDesigner Actions that present the user with the ability to choose a FileMaker Database have a Get DB Details button. Clicking on this button acquires details of all the open databases for your document from your currently running copy of FileMaker. For this to work, you must have AppleScript enabled for Actions in your Freeway preferences.

These Actions do no write to or alter the database in any way.

Open Databases in FileMaker

Before you can get any information from the databaseyou need to open it in FileMaker. If you need the screen space, or you don’t like the extra windows visible on your screen, you can always hide FileMaker when it isn’t needed.

Get Database

1 Save your Freeway Document.

2 Open all the databases that you need to use in this web site in FileMaker.

(21)

Getting Details of Databases from FileMaker 21 3 In the Action’s interface click on the Get DB Details button.

4 The first time you click on the Get DB Details button DataDesigner will prompt you for the name of the FileMaker Application.

Enter the name of your FileMaker application.

NOTE: Typically your copy of FileMaker is simply called FileMaker Pro, however if you use FileMaker Developer it will be called ‘FileMaker

Developer’. If you have renamed your copy of FileMaker in the Finder enter the new name here.

5 DataDesigner will report the Databases that FileMaker has open and it has acquired details from.

If DataDesigner was unable to successfully communicate with FileMaker or if FileMaker had no Databases open you will see this message:

There is a single set of FileMaker details stored per document. Acquiring database details will make these details available to all DataDesigner actions within the document.

(22)

Updating when Databases have Changed

DataDesigner stores details of the databases that it acquired. It does this so that you are able to work without FileMaker being open, and because interrogating FileMaker is slow.

If you change the databases that your site publishes, or if you want to work with different databases you will have to get fresh database details and overwrite the existing ones.

The steps for overwriting your existing database details are the same as acquiring them for the first time, except:

1 DataDesigner will not prompt you for the name of the FileMaker Application, as it has stored this away.

DataDesigner will prompt you before overwriting your existing details

Where the Information is Stored

DataDesigner stores details of the Databases and the name of your FileMaker application in a folder next to your Freeway Document. The folder’s name is derived from the Freeway document file name and will always be in the same relative location. For example, if your Freeway file is called Confetti, the folder will be named Confetti_ - see screen shot below. It is important that you do not edit, remove or rename any files in this folder.

(23)

Getting Details of Databases from FileMaker 23

When DataDesigner looks for database details it always looks for a folder based on the name of the document, physically next to the document. This means. for example, the folder will appear “lost” if you do save using Save As or change the name of the document. You can easily copy, rename or move the folder, or recreate it by acquiring database details from Filemaker.

Power Tip: If you experience difficulties with DataDesigner targeting the wrong version of FileMaker (if you have multiple copies on the same machine) you can delete this folder and acquire the details afresh.

Using Databases Details

After acquiring Database details for the first time the Action’s Interface changes so that the Database field has a popup menu that has the list of databases acquired.

Before After

(24)

Once the database’s details have been acquired the database can be chosen from the popup menu

DataDesigner captures layout and field information of the databases.

(25)

Displaying Values (FM-Value) 25

Displaying Values (FM- Value)

To display data using this Action, you first need to tell FileMaker what to search for. Passing a query either via a link or a form does this. You can set up such a request using the FM-Link Action or by setting up a search form on the page that queries the database. This only works on pages that are accessed from a Dynanic request.

Field Values

The Field Value drop-down has a number of options available to you (the terms in brackets are the CDML that the Action will output):

(26)

Returned Data

This is data that has been returned by the database following a dynamic request being passed to the server. You can use this to output any or all information that has been found.

Field Value (-field) - This inserts the content of the selected field into the HTML.

Field Name (-fieldname) - This inserts the name of the selected field into the HTML

Counting Records

It is customary to indicate to people where they are in a block of search results, especially when a large amount of data is returned. You can specify the

number of items displayed per page of data, and indicate where the user is in the returned data, using a phrase like this:

(27)

Displaying Values (FM-Value) 27

“Showing 10 of 100 records found. Showing records 1 to 10.”

The next few FM-Value Action settings can be used in such a situation.

Total Records in Found Set (-currentfoundcount) - This inserts the number of records found in the data set.

Number of Last Record in Range (-rangeend) - The ID number of the last record in the range of data returned.

Records Shown in Range (-rangesize) - The number of records returned for the range specified.

Number of First Record in Range (-rangestart) - The ID number of the first record in the range of data returned.

Date and Time

The following settings can be used to output various date and time information.

Current Date (-currentdate) - Returns the current date.

Current Day (-currentday) - Returns the current day.

Current Time (-currenttime) - Returns the current time.

Environmental Information

The following settings can be used to output information about the

environment in which the database is being accessed. These are of particular use when debugging a page that may not be behaving as expected.

Name Entered in authentication Dialog (-clientusername) - Returns the name entered in an authentication dialog, for example when a user logs on to the site.

Cookie Value (-cookie) - Returns the value set in a cookie.

ValueListItem current element in value list (-valuelistitem) - This returns the next element in a value list. For example, you may have a radio button cluster that needs outputting into the HTML.

This Action must be contained within an FM-Block Action using [FMP- ValueList] and [/FMP-ValueList] as enclosing CDML.

Current action (-currentaction) - This inserts the current action used by FileMaker into the HTML.

Current Database (-currentdatabase) - This inserts the current database name into the HTML.

Current Layout Name (-currentformat) - This outputs the name of the current layout name in FileMaker into the HTML.

Current Token (-currenttoken) - This outputs the value of the selected token into the HTML.

(28)

Last Request Information

These output information about the last request, which could be useful for debugging purposes.

Find Field Name – from last request (-findfielditem) - This outputs the names of the fields that were part of the last request.

This Action must be contained within an FM-Block Action using [FMP- CurrentFind] and [/FMP-CurrentFind] as enclosing CDML.

Find Field Value – from last request (-findvalueitem) - This outputs the values of the fields that were part of the last request.

This Action must be contained within an FM-Block Action using [FMP- CurrentFind] and [/FMP-CurrentFind] as enclosing CDML.

Find Operator – from last request (-findopitem) - This outputs the find operator from the last request.

This Action must be contained within an FM-Block Action using [FMP- CurrentFind] and [/FMP-CurrentFind] as enclosing CDML.

Miscellaneous

The following output other kinds of data:

Contents of Next Repetition (-repeatingitem) - Some databases have fields with more than one entry. This is used to insert the contents of the repeating item into the HTML.

Sort Field Name – from last request (-sortfielditem) - This returns information about the sort specified in the last request.

This Action must be contained within an FM-Block Action using [FMP- CurrentSort] and [/FMP-CurrentSort] as enclosing CDML.

Sort Order – from last request (-sortorderitem) - This returns information about the sort order specified in the last request.

This Action must be contained within an FM-Block Action using [FMP- CurrentSort] and [/FMP-CurrentSort] as enclosing CDML.

(29)

Dynamic Requests 29

Dynamic Requests

Pages are served dynamically by issuing requests to FileMaker. There are two ways to issue a request to FileMaker, through a link or through a form. The same information is sent to the server in both these cases.

The request sent to FileMaker is composed of two parts:

1 Action tag – This describes what FileMaker is actually required to do.

e.g. ‘Find a Record’.

2 Variable tags – This describes how it should do it e.g. which database to look in, which fields to search for, which page to present the

results in and so on.

FileMaker supports the following actions in dynamic requests.

1 New Record (-new) Creates and populates a new record.

2 Delete Record (-delete) Deletes a record.

3 Duplicate Record (-dup) Duplicates a record.

4 Edit Record (-edit) Updates the contents of a record.

5 View a Page (-view) Serve a new page dynamically without issuing one of the other Dynamic Requests.

6 Find Record (-find) Submits a search request.

7 Find All Records (-findall) Finds all the records in a database.

8 Find Any Records (-findany) Finds a single random record.

9 Open Database (-dbopen) Opens a database.

10 Close Database (-dbclose) Closes a database.

Link Requests

A link request is special hyperlink that is a dynamic request for FileMaker to perform an action. This is passed as a query in the URL. When a Web user follows the link the request is sent.

Link requests for FileMaker are written as a CGI request targeted at FileMaker’s Web-Companion plug-in. The request specifies the target, the action tag and a list of variable tags that define how the action should be performed.

One of the simplest requests is simply for FileMaker to serve a new page. For such a request you need the following components

1 A target defining that FileMaker’s Web Companion plug-in should service the request

(FMPro)

(30)

2 An action tag defining what FileMaker should do, in this case serve another page

(-view).

3 A variable tag specifying the database to be used (-db=Contact Management.fp5)

4 A variable tag specifying which page to serve (-format=mypage.html)

The fully constructed request would look like this

FMPro?-db=Contact%20Management.fp5&-format=mypage.html&- view

FM-Link

DataDesigner provides the FM-Link Action to construct link requests. To use it apply the FM-Link Action to an item, and use the Action’s interface to define the request and its variables.

FM-Link Action provides an interface in which you can set the action and the basic variables for a dynamic request. You can further customize the links that it constructs by adding one or more of the FM-Extras Actions.

Without using DataDesigner you can manually add dynamic links by entering the link as text into the Edit Hyperlink Dialog.

(31)

Dynamic Requests 31

Adding a Link Request to an Item

A Link Request is created by applying the FM-Link Action to an item, and within the Action setting the action tag and variable tags. Within the FM-Link Action it is possible to set all the basic variable tags for a dynamic request. You can further customize the links that it constructs by adding one or more of the FM-Extra Actions to the item.

The Link Request can be applied to graphic, markup, html image-map items and table-cells.

1 Select the item.

2 Attach a FM-Link Action to the box, either by choosing FM-Link from the Actions submenu in the Item menu or by clicking the Add Action icon in the Actions palette and selecting FM-Link from the Add Item Action dialog.

(32)

3 Make sure that the Actions palette is visible.

4 If you have not already acquired database details then use the Get DB Details button to get details of your databases.

5 Using the Database popup choose a database that the dynamic request will refer to during processing.

NOTE: All dynamic requests require a database.

6 Set the variables that you wish work from the Variables popup menu.

The Variables popup lists variable sets appropriate for different Action Tags.

(33)

Dynamic Requests 33 7 The interface will show the set of variables appropriate to that Action

Tag.

8 Set the variables.

9 Publish. When applied to an item the FM-Link Action will generate a hyperlink. If the item already has one or more links within it then the FM-Link action will replace these links. If the Item has no links within it then the action will create a link that encloses all of the contents.

Controlling the link

The FM-Link Action has a facility to control which link the Action replaces links through a key phrase mechanism. This is most useful for text.

1 Select the text or item that is being linked on.

2 Choose Hyperlink from the Edit menu to bring up the Edit Hyperlink dialog box.

3 In the Hyperlink dialog enter a key phrase e.g. banana. The FM-Link Action will look for links with this key to decide which links to replace.

4 Attach a FM-Link Action to the item, either by choosing FM-Link from the Actions submenu in the Item menu or by clicking the Add Action

(34)

icon in the Actions palette and selecting FM-Link from the Add Item Action dialog.

5 Make sure that the Actions palette is visible.

6 Open the Advanced section of the FM-Link Action by clicking on the disclosure triangle.

7 In this section there is a Replace Links field.

Here enter the key phrase (in this example banana) that you entered for the links that you want to replace.

8 Publish.

Multiple Links in Text

By applying FM-Link Action to mark-up item you can have a number of different dynamic links within a single run of HTML text.

This method of links works by inserting the text that you wish to be in the link in a markup item and then applying FM-Link Action.

1 Select the run of text that you want to apply a link to.

2 Copy the text.

3 Choose Markup item from the Insert menu.

(35)

Dynamic Requests 35 4 Paste the required text that you copied into the dialog and click OK.

This will insert a markup item into the text replacing the selected text.

Power Tip: To modify the contents of the markup item it is often easiest to select the item and then choose Modify from the Item menu.

5 Select the markup item. Attach a FM-Link Action to the box, either by choosing FM-Link from the Actions submenu in the Item menu or by clicking the Add Action icon in the Actions palette and selecting FM- Link from the Add Item Action dialog.

6 Set the parameters for the Action in the Actions palette.

Custom Links

The interface of FM-Link Action allows you to set variables and will construct links according to these parameters. If you change any parameters, or if any of the parameters change, the link will be constructed afresh. This means that if you change, for example, the name of the HTML file that a given page

generates then a new link correct will be created that links to this page automatically.

DataDesigner does not provide access to all possible variables instead it

provides a useful subset. It also provides a set of FM-Extra Actions that provide control over extra variables. However there may be situations where you need complete control over the link code. To cater for this eventuality the FM-Link Action allows you to edit the link it creates.

1 Select the item and apply the FM-Link Action as described earlier.

2 Set all the parameters that are relevant to your link.

3 Apply any FM-Extras Actions that you require.

Power Tip: Setting as much as you can in the FM-Link Action and any FM- Extras Actions will reduce the amount that you will have to edit the link.

4 Apply any FM-Extras Actions that you require.

5 Open the Advanced section of the FM-Link Action by clicking on the disclosure triangle.

(36)

6 Click on the Custom href button.

7 DataDesigner will display a dialog with the full text of the link that you can edit.

When you create a custom link it is no longer possible to use the Actions interface to change the link. Additionally if parameters that the action

depended on changed (if for example the name of the HTML file that a given page generates changes) the link will not be automatically updated.

Encoding of Links

In order to produce links that are suitable for transmission DataDesigner URL encodes the information for all the variables. For example if your database is called “my database.db” it will appear in the link generated by DataDesigner as “my%20database.db”.

The encoding deployed by DataDesigner will not encode text that between

“[FMP-“ and its closing brace “]”. This is so it is possible to have CDML replacement tags as variables.

Form Requests

A form is a section of a Web page from which a web user can send data to the Web server on which the page resides. In the case where FileMaker is serving web pages,

a form makes it possible for a web user to enter data that is then sent to FileMaker as a part of a dynamic request. FileMaker can process the

information and perform actions such as searches, adding or modifying records etc..

FM-Form

The key difference between issuing dynamic requests from a form and from a link is that a form can have input items in the web-browser where the web user can enter information. In a link all the components of the dynamic request are fixed.

DataDesigner supports forms primarily through a pair of FM-Form actions. The Actions behave analogously to, and have an interface almost identical to the FM-Link Action.

There are two FM-Form Actions; a Page Action, and an Item Action. The Page Action will create a form that encompasses the content of the entire freeway

(37)

Dynamic Requests 37 page. The Item Action will create a form that encompasses the item to which it is applied, it allows multiple forms on a single page. These Actions are

intended to replace the use of the Form Setup dialog in Freeway.

Form requests use the same tagging mechanism as used for links so like a Link Request, the Form Request has to be targeted at FileMakers Web Companion plug-in. the rest of the is composed of two parts:

1 Action tag – This describes what FileMaker is actually required to do.

e.g. ‘Find a Record’.

2 Variable tags – This describes how it should do it e.g. ‘Which

database to look in, which fields to search for’, which page to present the results in.

Within a form these tags are specified in form items. For the main part they are generally hidden fields – however any form item can specify them. One of the simplest requests is simply for FileMaker to serve a new page. For such a request you need the following components

3 A target defining that FileMaker’s Web Companion plug-in should service the request

(FMPro)

4 An action tag defining what FileMaker should do, in this case serve another page

(-view).

5 A variable tag specifying the database to be used (-db=Contact Management.fp5)

6 A variable tag specifying which page to serve (-format=mypage.html)

The following HTML fragment would describe this form.

<form method=post action="FMPro">

<input type=hidden name="-view">

<input type=hidden name="-db" value="Contact Management.fp5">

<input type=hidden name="-format" value="mypage.html"

</form>

DataDesigner provides the FM-Form Actions to construct Form requests.

(38)

FM-Form Action provides an interface in which you can set the action and all the basic variables for a dynamic request. You can further customize the links that it constructs by adding one or more of the FM-Extras Actions.

Adding a Form to a Page

A form that encompasses the layout tables of the page (the whole page

excluding layers) can be created by applying the FM-Form Action to the page.

Settings are made within the Action using action and variable tags. Within the FM-Form Action it is possible to set all the basic variable tags for a dynamic request. You can further customize the forms that it constructs by adding one or more of the FM-Extra Actions to the item.

1 Ensure that nothing is selected on the page.

2 Attach a FM-Form Action to the page, either by choosing FM-Form from the Actions submenu in the Item menu or by clicking the Add Action icon in the Actions palette and selecting FM-Form from the Add Item Action dialog.

(39)

Dynamic Requests 39

3 Make sure that the Actions palette is visible.

4 If you have not already acquired database details then use the Get DB Details button to get details of your databases.

5 Using the Database popup choose the database that the dynamic request will refer to during processing.

6 Set the variables that you wish work from the Variables popup menu.

The Variables popup lists variable sets appropriate for different Action

(40)

Tags.

7 The interface will show the set of variables appropriate to that Action Tag.

8 Set the variables.

9 Publish. When applied to an item the FM-Form Action will generate a form with the required Form Action and hidden fields for the variable tags and action tags described in the interface.

NOTE: All dynamic requests require a database.

It is possible to define a form using Freeway’s Form Set Up dialog. However, DataDesigner automates this process for you and helps you maintain links throughout your Freeway document. A manually defined form would need editing if a page’s location of file name changes.

(41)

Dynamic Requests 41

Adding a Form to an Item

DataDesigner provides an FM-Form item that can be applied to items.

Typically it is applied to a table or HTML text box, but it can be applied to any HTML item. You should use this Action if you want to have multiple forms on a single page or if you want to have forms that are layer items.

1 Select the item.

2 Attach a FM-Form Action to the box, either by choosing FM-Form from the Actions submenu in the Item menu or by clicking the Add Action icon in the Actions palette and selecting FM-Form from the Add Item Action dialog.

3 Set the parameters in the Actions palette in the same way as when the FM-Form Action is applied to a page.

(42)

Extending the Form Tag

The Advanced section of the FM-Form Action makes it possible to add additional attributes to the Form tag. You will need this, if, for example you want to give your form a Name, or an onSubmit attribute.

1 Make the FM-Form Action’s interface visible in the Actions Palette.

2 If the Advanced disclosure triangle is closed then click on it to reveal the advanced section of the interface.

3 Click on the Extend FORM button

4 In the dialog enter the Attributes and their values in pairs separated by a “=”. Separate multiple Attributes by a <cr>. So to add the attributes name="MyForm" onsubmit="MyValidate()" you would enter.

NOTE: Do not quote Attribute Values. If you do, the final coding will be double quoted which will cause errors when the page is served.

Adding Additional Hidden Fields

The FM-Form Action will add the Action and Variable tags that are specified in its parameters as Hidden fields. Additional hidden fields can be added by using the FM-Extra Actions. If you need to add Hidden fields you should check that the FM-Extra Actions do not already cater for this as generally using these actions is simpler. The FM-Extra Actions are detailed later on in this manual.

The Advanced section of the FM-Form Action makes it possible to add specific Hidden fields that are not covered in other actions.

1 Make the FM-Form Action’s interface visible in the Actions Palette.

(43)

Dynamic Requests 43 2 If the Advanced disclosure triangle is closed then click on it to reveal

the advanced section of the interface.

3 Click on the Hidden Fields button

4 In the dialog enter the Field Names and their values in pairs separated by a “=”. Separate multiple Fields by a <cr>. So to add the fields:

<input type=hidden name="firstfield" value="first value">

<input type=hidden name="second field" value="second value">

NOTE: Do not quote Field Values.

(44)

FM-Extras Actions

All the FM-Extra Actions extend the dynamic request Actions – FM-Form and FM-Link. They allow you to add extra data which is passed to the FileMaker server. Using these Actions, you can further enhance the output of FileMaker so that results returned in the next page are tuned specifically to the needs of the client.

Extending Dynamic Requests

The FM-Form and FM-Link Actions provide add the Action Tags that are

required for basic Dynamic requests. The number of possible tags is quite large and the full set is not presented in these Actions.

Additional tags are available through the FM-Extras Actions. You should apply these Actions as an addition to the FM-Form or FM-Link Actions.

FM-ExtraEmail

This Action extends FM-Form and FM-Link.

FM-ExtraEmail allows you to tell FileMaker to send an email.

1 Enter the subject of the email 2 Enter the recipient’s email address 3 Enter the senders email address

(45)

FM-Extras Actions 45 4 If necessary, enter the cc and bcc email addresses

5 Use the Format File to point to the template file that FileMaker will use to construct the email (consult your FileMaker documentation for more information on this).

6 Enter the address of the server that will be sending the email (e.g.

your SMTP server).

FM-ExtraErrors

This Action extends the FM-Form and FM-Link Actions.

In some situations, you may encounter an error caused when the information set or returned by FileMaker is not expected. An example of this is an error caused by a search producing no results.

By default, FileMaker will produce a JavaScript error box like this:

This may not be desirable. The FM-ExtraErrors Action tells FileMaker what to do in certain situations.

1 Select the page or item to which the FM-Form Action is applied 2 Apply the FM-Extra Errors Action

3 Set the page to go to with the Page (-error) drop down.

(46)

4 Using the From (-errornum) and To: fields, define the range of error numbers for that page. In the above example, FileMaker will go to the None Found page in Freeway if an error number between the range 400 to 412 is flagged. This covers errors that occur when a record set returned by a search is empty.

FM-ExtraFields

This Action extends the FM-Form and FM-Link Actions.

This Action allows you to pass more fields through an FM-Form or an FM-Link Action. It also allows for comparisons to be made on a database search

(47)

FM-Extras Actions 47

This will search the database for all models owned by Gustav.

The Custom and More buttons allow you to edit the data used to construct the final CDML and fine-tune the search.

You can, for example, include more than one instance of a field in this box to allow for searches within a range.

1 Click on the Custom and More… button

2 Select the text from –op= to ID= and copy the selection.

(48)

3 Paste the text underneath the ID= entry. You will now have two entries for ID. Click on the OK button.

4 There will be two entries for ID shown. Enter 5 in one box and 12 in the other.

5 Ensure that the Comparisons (-op) check box is selected and in the dropdown that appears next the text box where you entered 12, select the gte (Greater than or Equal to) option.

6 Similarly, in the drop down next to the box where you entered 12, select that lte (less than or equal to) option.

The Action is now set to select all models owned by Gustav whose ID falls between 5 and 12 inclusive.

FM-ExtraSort

This Action extends the FM-Form and FM-Link Actions.

FM-ExtraSort allows you to decide the sort order of the returned records.

(49)

FM-Extras Actions 49

Select the field that you want to sort by, and the order of the sort (ascending or descending). You can define more than one sort criteria, allowing you to order the data as you want it to appear.

The Custom button allows you to define your sorts in a mark up window.

In this case, you need to add an A or a D after each field for Ascending or Descending. You can also add extra items, or remove those items that you do not wish to use.

FM-ExtraTokens

This Action extends the FM-Form and FM-Link Actions.

FileMaker allows you to pass tokens from page to page. Tokens contain

discreet data of your choosing that can then be read on the next page. You can

(50)

have up to nine token at any one time. This is very useful, as the FileMaker server forgets everything about the user and client once the page is processed and served.

DataDesigner does not offer much support for Tokens as they are best handled via raw CDML. Tokens are generally used by CDML programmers for more complex tasks, for which custom code is necessary. Tokens can, however, be saved and selected from popups in DataDesigner.

FM-Form

The FM-Form Action allows you to manipulate the database directly from the Web page. Not only can you initiate searches, but you can also add, remove, alter and duplicate records in a database. You select the function from the Tags drop down in the FM Form Action interface. The options available will change depending on this setting. Note that any input item contained within the FM Form should have the FM Input Action applied to them so that their contents can interact with the database.

New Record (-new) - Creates and populates a new record using data supplied in form elements with the FM Input Action applied to them.

(51)

FM-Extras Actions 51 Delete Record (-delete) - Deletes a record. You need to search for a record first, and then pass the Current Record ID through to the FileMaker server. This allows for a confirmation page before data is permanently removed.

Duplicate Record (-dup) - Duplicates a record. You need to do a search for the record first, and then pass the Current Record ID to the FileMaker server. This extra step allows for a confirmation page before data is permanently altered.

Edit Record (-edit) - Updates the contents of a record. Again, you need to pass FileMaker the Current Record ID.

View a Page (-view) - Serve a new page dynamically without issuing one of the other Dynamic Requests.

Show Image (-img) - Displays an image on another page using an ID or image key. The FM Image Action also does this.

Find Record (-find) - Submits a search request. Your search criteria will be entered into various form elements on the page.

Find All Records (-findall) - Finds all the records in a database.

Find Any Records (-findany) - Finds a single random record.

Open Database (-dbopen) - Opens a database. NB – the Password can be located by viewing the source of the HTML. This is a FileMaker limitation.

Close Database (-dbclose) - Closes a database.

(52)

More about Forms FM- Input

A form is a section of Web page from which a Web user can send data to the Web server on which the page resides. In the case where FileMaker is serving Web pages a form makes it possible to send data to FileMaker. FileMaker can then process the information and perform actions such as searches, adding or modifying records etc.

Multiple Forms on a Page

There will be times when you will want to incorporate more functionality into your pages. For example, you may want to have a full site search as well as focussed functionality on your page for specific products or services. This can be achieved by using multiple instances of the FM-Form Action on the page.

To do this, you would apply this Action to HTML boxes or tables and place your form elements with those items. Freeway will then build the appropriate HTML and CDML for each form.

FM-Input

This Action can be applied to a form element. The element corresponds directly to a database field, which is selectable from a drop-down menu as normal. The fields can be used to interrogate or change the database, depending on the settings of FM-Form.

Menu/List

When applied to this Action, you get the chance to add your own input names and values, as well as taking values from the FileMaker Value List.

Clicking on the Choices and Values button opens a window in which you can enter your own data.

(53)

More about Forms FM-Input 53

Each option/value pair needs to be on a new line in the window for the data to be output correctly.

This data can be combined with that already held in the Value List. See your FileMaker documentation for more on Value Lists.

Check-boxes

When the FM-Input Action is applied to a check box item in Freeway, the settings in the Inspector Palette are overridden by the code that the Action produces. The field that FileMaker will interrogate when serving the page is selected in the Field drop down. The value that the check box will return to the server is determined by the value entered in the Value field. Using the Checked drop down will determine how and when the check box is when the page is served

TextFields & Text Areas

When applied to a text area or text field, the Actions Palette allows the selection of the Field and Value via dropdowns. The Find (-op) drop down allows you to determine the scope of the search. In this example, FileMaker will search the modelDescription field for names, which contain data that was input by the user on the form.

(54)

Radio Buttons

When applied to Radio Buttons, the FM-Input Action overrides the settings in the Inspector palette. You can select the field that the Action will read from, as well as the value that the radio cluster will return if that particular button is selected when the form is submitted. FileMaker will check the radio button if the value in Value is returned when the page is served by using the Checked drop down in the Action’s Palette.

Submit Buttons

Apply the Action to an ordinary Form Button, and you can control how that buttons operates within the form, as opposed to the settings in the FM-Form Action. You can have a form with more than one function.

(55)

More about Forms FM-Input 55

You could have a form on your page that has two buttons – one to duplicate a record and one to create a new record from the data entered on the form.

Graphical Submit buttons

Create a graphic in Freeway and apply the FM-Input Action to it.

(56)

Do not use the Submit checkbox in Freeway as graphical submit buttons function differently in FileMaker. The function that the submit button sends to the FileMaker server is defined in the FM-Form Action.

.

Graphical Submit buttons require JavaScript to work with FileMaker. Normally when a graphical submit button is clicked, the x and y coordinates of the pointer’s position over the button graphic will be sent as part of the data returned to the server. This causes problems with FileMaker as the data for these coordinates will not be a named field in the database and FileMaker will produce an error as a result. The JavaScript used strips this information from the submitted data. If the function being performed is mission critical (e.g.

submitting details for a sale), you may not want to use graphical submit buttons, as JavaScript may not necessarily be functioning on the client’s machines.

If you do wish to use graphical submit buttons, you will be able to apply the Rollovers Action on them and have them change appearance. Regular graphical submit buttons do not offer this functionality.

It is possible to use the submit checkbox option in the inspector palette to make the button a true submit button, but you will have to deal with the x and y coordinates sent to FileMaker and any errors that they may cause.

(57)

More about Forms FM-Input 57

How to show existing values

At times, you may want to populate form items with existing data from the FileMaker database. For example, you may be working on an editing page and you will want the end user to see and edit existing data. This can be achieved simply with DataDesigner.

You will need to ensure that the Tags dropdown in the FM-Form Action (applied to a page or a Freeway item) is set to Edit Record (-edit). This will tell FileMaker that the data to be sent from the page will change that database content. You will notice that Record ID item in the action has a [FMP-

CurrentRecID] tag in it. This is the internal reference to the data being edited in the database. The previous page that would typically contain a list of editable entries in the database will have passed this.

(58)

You will also need to apply the FM-Input Action to any form items, and set them to display the fields from the database that you want editing. The action detects the setting of the FM-Form Action and will default to a setting that will automatically populate the input field with the values in the database.

Search Forms

Forms can be set up to search the database. You can include as few or as many fields, and you can then search the database using these criteria.

1 Set the FM-Form to use –find

(59)

More about Forms FM-Input 59

2 In the FM-Input Action, you can select a method to search by. For example, you can tell Freeway to find records that only begin with the text entered in the text field.

-op in the FM-Input Action

There are a number of options available in the FM-Input Action for searching.

Fuller explanations will be in the CDML Reference that shipped with these actions

eq – Equals - this will find all records that the selected field contains the exact contents entered by the user.

ct – Contains - this will find all records that contain the text entered by the user. Entering the word “the” will locate all records that contain that word, as well as records containing “Therein” or “other”.

bw – Begins With – this will find all records that begin with the text entered by the user.

ew – Ends With – this will find all records that end with the text entered by the user.

gt – Greater Than – this will find all files that are greater than that entered by the user. If 100 were entered, records containing 101 and higher will be returned.

(60)

gte – Greater Than or Equal To – this will find all files that are greater than or equal to that entered by the user. If 100 were entered, records containing 100 and higher will be returned.

lt – Less Than – this will find all files that are less than that entered by the user.

If 100 were entered, records containing 99 and lower will be returned.

lte – Less Than or Equal To – this will find all files that are less than or equal to that entered by the user. If 100 were entered, records containing 100 and lower will be returned.

FM-SearchOp

This Action is applied to a form menu/list and allows the Web user to decide how the search for the item they are looking for is achieved.

For example, you may have two inputs in the form that query different fields in the database. This Action gives your users the option to search using AND or OR operators.

(61)

More about Forms FM-Input 61

Checked options will be presented in the drop-down when the page is

processed by the FileMaker server. The three buttons directly below the list of checkboxes select versions options on or off. If the search is text based, you will only need text options. Clicking the Text ops button will only activate those.

You can also change the text that the list displays for each item by clicking on the Configure Custom… button. A window will open which will display a list of the options that you can edit.

(62)

Whilst you may not want to edit the text on the left hand side of the colon, you may want to alter the text to the right to suit your needs.

So, if you wanted the text for gte (greater than or equal) to say “More than”, you would edit the line that reads “gte:from” to read “gte:More than”.

References

Related documents

The purpose of this study was to evaluate the diagnostic utility of real-time elastography (RTE) in differentiat- ing between reactive and metastatic cervical lymph nodes (LN)

Source separation and kerbside collection make it possible to separate about 50% of the mixed waste for energy use and direct half of the waste stream to material recovery

Reporting. 1990 The Ecosystem Approach in Anthropology: From Concept to Practice. Ann Arbor: University of Michigan Press. 1984a The Ecosystem Concept in

In addition, if I marked &#34;Yes&#34; to any of the above questions, I hereby authorize release of information from my Department of Transportation regulated drug and alcohol

Thanks to the efforts of Don Ross and the other members of the Oklahoma Commission to Study the Tulsa Race Riot of 1921, the prevailing narrative preserved by Parrish and

When a compatible medication is added to the Glucose Intravenous Infusion, the solution must be administered immediately.. Those additives known to be incompatible should not

This was done by analyzing the extent to which the sample of Kosovan start-ups consider branding as an important strategy for their businesses, how much of branding they

The Lithuanian authorities are invited to consider acceding to the Optional Protocol to the United Nations Convention against Torture (paragraph 8). XII-630 of 3