Archive

Posts Tagged ‘filemaker’

Exporting Container Field Contents To Folders From FileMaker

March 29th, 2010 2 comments

Someone asked me today to help export container field contents. The additional requirement was to store the images in unique folders (because the container field contents might not have unique file names). I have created a short video to share the process with people:

I highly recommend replacing your old method of storing images in container fields with a new method: SuperContainer from 360 Works. It has a lot of advantages, one of them is reducing the file size tremendously. I use SuperContainer in almost every solution I build.

Download demo file

Special Thanks:

I’d like to thank the following people for their help in getting me on the right track here:

Steven Blackwell
Lee Hoong
Bruce Robertson

Importing RSS Feed Into FileMaker with XSLT

February 23rd, 2009 7 comments

Update:

Per popular request I am revisiting this article. I made some edits and also now you can download the the demo file.

Someone sent an email to our FileMaker group to request information about importing RSS feed into FileMaker. Since I have done this and it’s actually quite easy, I thought I’d post the method here.

Ingredients

  1. FileMaker (8.5 or later because you need Web Viewer);
  2. A FileMaker database ;
  3. An XSLT style sheet; (I found this style sheet somewhere some time ago; didn’t write it myself)
  4. A web host where you can post the XSLT file;
  5. An RSS feed that actually works with this (e.g. Yahoo Stocks: http://rss.news.yahoo.com/rss/stocks);
  6. A script that pulls the info (which now can be run on server if you have FMS 9 or 10);
  7. A table in your DB for storing the RSS feeds;
  8. A portal on your layout that shows the list of RSS feeds;
  9. A web viewer in your database that can display the resulted web page;
  10. A script that tells the web viewer to show the requested article.

Directions

  1. Create a new table called ‘RSS_Feed’ in your solution (since this only works in FM 8.5 and later, there’s no need for a separate file). Create the following fields: ID, Title, Description, Link, PubDate, SelectedLink;
  2. Link the new table to your preferred table (Global, Solution, etc.) by showing all records (‘x’ symbol);
  3. Create a new layout in your solution, place a portal on it showing the records from the RSS Feed table (link and description fields, minimum). Place a web viewer next to it. Name your web viewer object “article”;
  4. Create a script similar to this example to refresh the feed (you can run this script from a button on your layout or at certain intervals from the server):
  5. Go to Layout [ “Layout Name” (Table Name) ]
    Enter Browse Mode
    Show All Records
    Delete All Records
    [ No dialog ]
    Import Records [ XML (from http): http://rss.news.yahoo.com/rss/stocks; XSL (from http): http://www.website.com/folder/rss2fmp.xsl ]
    [ No dialog ]
    Go to Layout [ original layout ]
    
  6. Create a script for showing the article:
  7. 
    Set Field [ RSS_Feed::SelectedLink; RSS_Feed::Link ]
    Set Web Viewer [ Object Name: "article"; URL: RSS_Feed::SelectedLink ]
    
  8. Turn your title field on your portal into a button and link to perform the script above.

This is most likely not the only method; it may not be the best method either. It is, however a working method.

Any questions, suggestions, feel free to respond.

Categories: Tags: , ,

Demo of the FMTouch iPhone App with a FileMaker database

December 31st, 2008 5 comments

Photo by Sandy Hechtman

December 11, 2008: I presented a FileMaker-made-mobile solution to the members of the New York Motion Picture Collective and the New York FileMaker Developer Group. The presentation demonstrated bringing a database from FileMaker to the iPhone through the use of FMTouch.

Click the images below to get a closer look.

Click on the image above to see the video

Now, let’s look at how this is done. To get started with porting your own database to the iPhone or iPod Touch, you will need the following:

It may seem daunting at first, but these simple steps will allow you to begin:

  1. Design your layouts you would like to use on the iPhone according to the style guide;
  2. Buy FMTouch form the iTunes Store;
  3. Download the synch plug-in and place it in your FileMaker’s extension folder, then restart FileMaker.
  4. Make sure the plug-in is enabled.
  5. Set up synching to your database on the iPhone (check the User’s Guide for more on this);
  6. Transfer DDR to iPhone;
  7. Name your Database;
  8. Initialize DDR;
  9. Choose the layouts you want to see;
  10. Re-initialize;
  11. Synch your database to get the data from the computer;
  12. Open your database.

Congratulations! Now that you have a FileMaker database working on an iPhone or iPod Touch, here is a list of tips and tricks that might be helpful to you, as well as observations to be mindful of as you move forward in your own development.

LAYOUT DESIGN

* You can design the layouts based on the example DB and provided style guide. Make sure you pay attention to scrolling with fingers. If you don’t want editable fields to get in the way of scrolling, make sure to lock them down.
* With FMTouch you can show layouts in “portrait” (vertical), “landscape” (horizontal) or “both” modes. The iPhone is not able to differentiate between layouts whether they are designed for portrait or landscape modes. So you cannot simply rotate the phone in the hope that it will switch to a different layout. So, at this point you’re better off locking FMTouch to either vertical or horizontal mode, which you can do if you go to “Settings” after you click on the little “i” on the bottom right.
* Every time you change the layouts you would like to show, you have to reinitialize your solution.

LABELS

FMTouch is currently unable to show more than one line in a label showing text on the layout. You can, however, use two different workarounds:

  • You can type every line of text into a new label;
  • Or you can create a calculation field with the text you would like to show and place that on the layout.

FIELDS

You can use container fields in layouts, but they can only show a reference to an image. Only import the reference when you import an image; it will not show in FMTouch otherwise.

SCRIPTING

You can use the following script steps attached to a button on a layout:

  • Go to Layout*
  • Go to Record
  • New Record
  • Delete Record
  • Set Field
  • Go to related record.

* Note: You can use the “GoToLayout” script step directly from a button, but you cannot use this script step as part of a script, because “Perform Script” is not a supported script step.

Special thanks to Christina Tsao for her help with the database layouts.

Downnload the instructions (PDF)

I hope this has been helpful.