• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Web Publishing with FileMake... > Creating a Web-Based Find Script

Creating a Web-Based Find Script

When you're using IWP with the defaults suppressed, running a complete Find script can look a little dicey. Users can enter the Find data, but because hitting the Enter key does not resume the script as it does in FileMaker, they have no way to continue the script. To work around the problem, you'll need to create two scripts. The first will go the Find layout, enter Find Mode and pause to allow the user to enter the data. The second script performs the Find when the user clicks the Perform Find button.

To create a Web-based Find script:

1.
In the database to be hosted, go to the layout that will be used for the Find.

2.
Choose Scripts > Scriptmaker. In the Define Scripts dialog box, type Find Mode for the script name and click Create.

3.
In the Script Definition dialog box, click Clear All to delete the default steps.

4.
In the step list on the left, double-click Go to Layout. In Options, select Find from the Specify drop-down list (Figure 19.14).

Figure 19.14. The Find layout displays the fields that will be used in the Find command.


5.
In the step list on the left, scroll down the Windows section and double-click View As.

6.
In Options, in the Specify drop-down list, choose View as Form (Figure 19.15).

Figure 19.15. The View as Form option displays the layout as a form.


7.
In the Navigation section in the step list on the left, double-click Enter Find Mode. Uncheck the Restore find requests box, but leave the Pause box checked (Figure 19.16). Click OK.

Figure 19.16. Check the Pause option to allow the user to enter data.


8.
In the Define Scripts dialog box, type Perform Find for the script name and click Create.

9.
When the Script Definition dialog box appears, click Clear All to delete the default steps.

10.
In the step list on the left, scroll down to Sort/Find/Print and double-click Perform Find. Uncheck the Restore find requests box (Figure 19.17).

Figure 19.17. Restored finds are not supported in IWP, so this option should not be checked.


11.
In the step list on the left, double-click Go to Layout.

12.
In Options, choose from the Specify drop-down list the layout that you want to appear after the Find is complete .

13.
In the Windows section of the step list on the left, double-click View As.

14.
Choose a layout type from the Specify drop-down list in Options. If the layout you chose in step 12 is a Form, choose View as Form. If it is a Table View layout, choose View as Table (Figure 19.18). Click OK, then Done.

Figure 19.18. The View As option displays the layout as either a Table or a Form.


15.
In the Form View layout, choose View > Layout Mode.

16.
Add a new button or Ctrl/Option-drag an existing button to duplicate it. Double-click the new button.

17.
When the Specify Button dialog box appears, choose Perform Script from the list on the left. From the Specify drop-down list, choose Find Mode (Figure 19.19).

Figure 19.19. The Find Mode script switches the user to the Find layout and pauses in Find Mode.


18.
In the Find layout, choose View > Layout Mode. Add a button. Double-click on the new button. In the Specify Button dialog box, choose Perform Script.

19.
In Options, choose Perform Find from the Specify drop-down list (Figure 19.20). Click OK.

Figure 19.20. The Perform Find command carries out the Find using the criteria the user enters.


20.
Label the button Perform Find. You can add text instructions to the layout (Figure 19.21).

Figure 19.21. Adding text instructions helps a user understand the options on a layout.


When the user accesses the layout, the layout will look the same as your FileMaker layout, and they'll have no problems creating and performing a Find (Figure 19.22).

Figure 19.22. In Find Mode, Web users will see an operator list when they click in a field



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint