Web Viewer Notes
So you've integrated support for managing notes, and you'd really like your users to be able to view the full length of each note. The problem is FileMaker's portal object.
With portals, you get a fixed field width and height and it's the same for all related records shown within the portal. Sometimes it will chop the text off and other times it will show a lot of extra white space. Never fear, it's the wonderful web viewer to the rescue.
The trusty web viewer not only provides the dynamic resizing of objects based on how it renders content, but comes included with the powerful support of Javascript.
"But I don't want to learn Javascript." you say. Never fear, it's just one function and the rest is up to how you integrate within FileMaker.
This video will provide you with the technique file and content necessary to manage notes in a very effective manner. Learn the concepts used, and you'll expand your knowledge of FileMaker to a level where you can leverage that knowledge across many other aspects of your development!
Comments
edit notes
Matt
the click to edit or delete note doesn't work in he demo file
John
Sharing needs to be turned on
This particular technique requires the file to be hosted or on FileMaker Go. You'll need to make sure FileMaker Sharing is turned on under Sharing > FileMaker Network...
You'll also need a copy of FileMaker Pro Advanced to test - because it allows one connected instance for network testing on a local machine. I do have a note in the Startup script and it does catch a regular copy of Pro, but not Advanced without sharing turned on.
-- Matt Petrowsky - ISO FileMaker Magazine Editor
edit note
Matt
clarification:
it does work on as hosted file but appears not to work on a local machine.. any ideas why?
John
Why fmp:// url does not work in local files
I would assume the primary reason that fmp:// urls work on a hosted file and on Go only is because of stand alone limitations.
FileMaker Inc. wants people to use FileMaker as a networked solution and therefore sell multiple seats of FileMaker. By not having it work on a local file this limits its use to hosted files and mobile. Otherwise, you can use Advanced and make bound copies of whole solutions and accomplish a lot of things that would not require all of the FileMaker pieces to the puzzle - such as server.
So, I'm guessing this is not a technical limitation but a corporate one. :)
-- Matt Petrowsky - ISO FileMaker Magazine Editor
Making it work...
Hello Matt,
great technique. Thanks for this...
Maybe for all those people who acknowledged that your demo file doesn't work: please put FileMaker Network Sharing on ;-)
Greetings from Berlin/Germany
Holger Bolecke
fmworks.de
Thanks Holger
Correct. I didn't mention this in the video, but I should have. This particular solution requires the file to either be hosted or on FileMaker Go. The fmp:// url does not work on a local only file.
In fact, you'll see in the Startup script that a script is there which determines if the file is opened locally. However, I think I forgot to make it also show on Pro Advanced. I'll have to fix that issue.
There is also an additional script in the file from when I shot the video. It's a script which is used OnRecordLoad.
The reason for this script is when the file is moved. Because the notes are cached, you have to make sure and check that the fmp url within the notes matches the current server the file is being hosted on.
-- Matt Petrowsky - ISO FileMaker Magazine Editor
peculiar issue with technique
Thanks Matt for sharing this very clever technique. Portal row height on notes is an issue in our solution and this could end up solving that problem.
Something I've noticed, though, if you have both Pro and Pro Advanced installed and both open, triggering the edit note will open the demo in the other program as well! At least on OS X.
Most people don't have both installed, so this would definitely be a niche issue, just thought I'd bring it up so that you and others could be aware of this potential issue!
Dale Long
The registered app
When you install FileMaker it also handles the registration of which app should be used for the fmp:// url.
I believe, if you install Pro after Advanced then it would take priority. The way to test for which app currently has the url registered is to close all copies of FileMaker and call the fmp:// url from within a web browser.
You may be able to do some research and find out if you can script this from within FileMaker via some type of shell script. If it's Mac only then you could possibly do this with AppleScript.
Ultimately, it's always and issue of finding the switch and changing it to what you want. ;)
Thanks for the feedback!
-- Matt Petrowsky - ISO FileMaker Magazine Editor
Font Size in FMGo
Really neat idea here! I'm not familiar with all of the concepts here, so apologies for my ignorance.
1) Very possibly user error, but for some reason the notes font is showing really small on my phone. It shows normal on my laptop but then it's very small when viewing in FM Go on the iPhone 6S.
2) I'd like to add a field header with the User's Name in each note. Do I just add this to the $InMemory in the script?
TLC Development