From within the context of FMGo12 you will probably have an easy time realizing your objective if you utilize the FMP URL protocol functionality. This functionality allows you to invoke scripts defined in your FM solution by launching a URL. This includes launching a URL by clicking on a link from within a webviewer . Once you are familiar with this technique, I think that you will find it very easy to use. Below I will include some help to get you started with this.
The documentation regarding the FMP URL protocol is here:
A fun blog article which illustrates sophisticated use of the FMP URL invoked from a webviewer is here:
I will attach a modified version of your Parking file which illustrates one possible way you could go about this with a minimal amount of change to your existing code.
The modified version has the following changes from the original file which you posted:
Question for you:
I noticed that performance of this file seems rather sluggish on FM Go. I took a closer look under the hood to see why this might be the case, and I believe that some modifications to how you generate the webviewer content could help speed things up, thus making the UI more responsive to the user's clicks. In particular, I am concerned with the fact that I see multiple calls of the List function against various unstored calculations. Even over a small set of records, the performance hit seems noticeable. I took a look at what this list data accomplishes within the generated HTML source, and my suspicion is that some small changes to the CSS strategy could significantly improve this situation. The existing code is certainly very logical in its methodology, but it does not appear to have been designed with your particular application in mind.
A few possibilites occur to me:
- You haven't noticed any poor performance on your end
- You are fully aware of this, and simply haven't reached the point where you are optimizing the code
- The HTML and CSS code was originally generated by a tool to help create image maps suitable for use in a variety of contexts, but not specifically for use within the context of FM Go.
Do you have any comments regarding the above? Please note that my intention is not to needlessly tear apart your code to critique it. My motivation is to stir up some ideas to perhaps get a good idea to run better.
Parking_File_MODIFIED_001.zip 349.7 K
thank you, thank you! This was exactly where I got stuck! It simply did not occur to me that I didn't need the scripttrigger anymore, I have been fooling with the FMP-protocol but I had left the scripttrigger on the webviewer and lead me to believe that the problem was unsolvable without doing massive changes. Your changes clearly show that it can be done with a few minor changes.
I noticed the poor performance and haven't come around to optimizing the code and I designed this originally for a desktop environment, using it on iPads is just a new (and interesting) application ;-)
I don't mind being criticized at all, in my view it is what helps people to gather knowledge and get better at what they do, there is allways room for improvement. So thank you very much for your remarks and I will put them to good use ;-)
Again thank you very much for your additions and your comments, they are much appreciated
best regards, Menno
Excellent! I am so pleased that this was helpful. Thank you for your post.