Transcription

Hi, this is Michelle at AppWorks and today I’ll be discussing the best practices for using a web viewer to display FileMaker data. Using a web viewer to display FileMaker data is one of the easiest and most versatile ways to enhance the functionality of your FileMaker app. Implementing this the right way is key to making sure your web viewer doesn’t break down the road.  

A common way to display data is to use a Let Function. We’ll use one for our example, but just note that it isn’t necessary to accomplish our goal. In this example we are creating a summary of our task with the task name, due date, priority, and description here in a web viewer. As you can see, it’s working great at the moment. Our Let Function is assigning our FileMaker fields to variables that can then be used down here in our html. This keeps our code a little bit simpler and cleaner. As you can see, it works great. Most likely, you’ll never notice anything wrong using a web viewer like this in FileMaker Pro.

But what if, one day, you decide that what you really need is a WebDirect application. If we open up the task database as we have it now, you can see that, unfortunately, the web viewer appears to be broken. The reason for that is this special character right here, the pound sign or hashtag (#). If we remove it and save, we’ll see that a lot more of our information appears. It appears that this pound sign is breaking our web viewer. We could just remove them, but thankfully this can be easily fixed using one additional FileMaker function. If we go back to FileMaker Pro, we can actually modify our let function and wrap our FileMaker fields with a function known as GetAsURLEncoded. I’ll go ahead and wrap all of our fields right now, and that’s it! We’ll say okay and we’ll save.

Now here in FileMaker Pro, we are seeing something a little bit funky – it’s taking all of our spaces and turning them into %20, but that’s okay because our goal is really to get this to work in WebDirect. Let’s add our pound sign back in, and as we can now see, it’s now displaying everything the right way. This one simple modification will make sure that your web viewer displays your FileMaker data consistently and accurately in WebDirect. Thanks for watching!