Cluster Maps and Instant Web Publishing


A reader asked how to make the Cluster Maps demo database work with Instant Web Publishing. A little bit of research in the documentation for Instant Web Publishing (IWP) suggested a possible solution. The Demo database has been updated to reflect these changes.

Inside the FileMaker Pro folder is a folder called ‘Web’

wpid3489-media_1375980322367.png

Inside that folder is a PDF called ‘Read Me’. It states:

Use the Web folder to store external files to share with Instant Web Publishing. You can include:
• images and referenced files for container fields
• static HTML pages

• a customized Database Homepage with the filename iwp_home.html

For more information, see the FileMaker Instant Web Publishing Guide.

Modify $Path variable step in the ‘Generate JSON..’ script.

wpid3490-media_1375980551743.png

Modify the Case statement to include another menu option

wpid3491-media_1375980642886.png

Add a case statement for saving to the Web path:

Settings::gSave_File_Location=”FileMaker Web”; Get ( FileMakerPath )&”/Web/”

Add ‘FileMaker Web’ as an option to the Export Value list.

wpid3492-media_1375980704946.png

Change the ‘File Locations’ Value List

wpid3493-media_1375980716928.png

Add ‘FileMaker Web’ to the list

wpid3494-media_1375980731640.png

In the database Settings tab, change the ‘Save File Location’ field to ‘FileMaker Web’

wpid3495-media_1375980750672.png

Cluster Map generated to the FileMaker Pro Folder: Web folder

wpid3496-media_1375980800322.png

Viewing the Cluster Map in a browser

wpid3497-media_1375980837815.png

Once it is generated, the file is available to view at this IP address: Localhost/MyClusterMap.htm

A calculated version of this URL is Get ( HostIPAddress )&”/”&Settings::gFile_Name

Modify the Display Map script

wpid3500-media_1375984592127.png

Add Checks for IWP and FileMaker Web file saving

wpid3501-media_1375985491445.png

To making viewing the file in IWP simpler, modify the ‘Display Map’ script to include a couple of checks upfront.

Check if the ‘Save File Location’ is set to ‘FileMaker Web’ and the database IS being viewed from IWP

If [ PatternCount ( Get ( ApplicationVersion ) ; “Web” ) >0 and Settings::gSave_File_Location=”FileMaker Web” ]
Open URL [ Get ( HostIPAddress )&”/”&Settings::gFile_Name ]
Halt Script End If

Check if the ‘Save File Location’ is set to ‘FileMaker Web and the database is NOT being viewed from IWP

If [ PatternCount ( Get ( ApplicationVersion ) ; “Web” ) =0 and Settings::gSave_File_Location=”FileMaker Web” ]
Open URL [ Get ( SystemIPAddress )& “/”&Settings::gFile_Name ]
[ No dialog ]
Halt Script End If

Set up Instant Web Publishing

wpid3498-media_1375980863833.png

1) Turn Instant Web Publishing on,
2) select your database and
3) set the appropriate privilege set.

Cluster Maps viewed from IWP

wpid3502-media_1375988791827.png

1) Generate the HTML file
2) Click ‘Display Map’

Cluster Map viewed from a Web Browser using IWP

wpid3499-media_1375984480892.png

Finally, I modified the Generate JSON and HTML script to eliminate the IWP unfriendly dialog box and Display Map steps. Now it is a two step operation to view the maps. 1) Generate and then 2) Display.

Related Articles

Cluster Maps – Update – Fixed Popup Formatting Bug

Advertisements

Trackbacks/Pingbacks

  1. Mapping Directions from FileMaker Pro with Google Maps | HomeBase Software - February 3, 2014

    […] Cluster Maps and Instant Web Publishing […]

%d bloggers like this: