Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Portals with scripts attached


This topic is 7027 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

In my original FileMaker application, I have a number of portals where each "column" in the portal is clickable. Based on which column was clicked, I call a script to either do something as simple as a navigation command, or perform a more complicated script step. I have two questions, related: What is the best way for displaying portal data? What is the best way to duplicate the clickable functionality?

Currently, I am using the HTML Menu/List (as a list) to display portal contents. This works great when there is only one piece of data to display. It lets me limit the portal to a set number of rows, and has a scrollbar, so it is essentially a portal. There are obvious limitations though, and the only way i've found to trigger a script is with a javascript onChange command - this hasn't always been very helpful. Also, you can't really do multiple "columns."

It doesn't seem practical to put the data in a table, since really I would want to limit to (for example) only 10 rows of the related data showing, not a huge table that extends for pages down the screen. Someone once mentioned instead of a list, or a table, use a frame, with a table inside it. Suggestions?

Finally, how is it best to run the scripts? Normally, upon clicking in a portal to activate a script, the portal row and which record is being clicked on is known information. That way any field setting that happens in the script will know which record you're dealing with, etc.

Any tutorials, walkthroughs, or general help would be appreciated. I know I can't be the only person struggling with duplicating this functionality with XSLT/HTML.

Posted

Currently, I am using the HTML Menu/List (as a list) to display portal contents.

Do you mean that this is done with FM 7 Pro client? Can you explain a little bit?

What I did in one of our XSLT applications is a general column header template that sorts the selected column. Column header name, field to be sorted, default sort order when clicked first and current sort state are passed as parameters. The column headers are implemented as a simple HTML links (no JavaScript included) that calls the stylesheet with the new sort order. This works also with portal data, but sometimes one has to do an additional sort with xsl:sort so that the portal data is sorted correctly.

If you want to limit the number of portal rows displayed with XSLT, there are three options (the first two I tried out, and I use the first);)

- use the XSLT document() function and -max and -skip to call the records of a related table (however: FMS7A in the present version has some problems with XSLT document() that are still not solved, see other threads in the FMS7A and this forum).

- use a >= <= relation to a table occurence to limit the portal data. This is slow. Really slow.

- Get the complete portal data and filter it the needed rows with XSLT. For this you need probably a counting loop, which can be realized within XSLT only with recursive technique. Depending on the total number of portal rows, this might also be slow (not because of the XSLT, but because of the FM Publishing engine that has to deliver all the XML data to the XSLT processor).

Posted

I meant, when I originally developed the application, it was intended to be accessed remotely, with the client. As I am rewriting, I ran into the issue of how to best display portals: specifically, a portal which normally displays (for exmaple) 10 rows, but has a scrollbar.

In addition to this, there was the issue of clicking on an item displayed in the portal, and causing a script to be run.

When I first started doing the rewrite, I was using the list/menu HTML object to act as my portal, because it was an object that can display (again, for example) 10 rows, but has a scrollbar. The only way for me to run a script doing this, however, was using javascript. Plus, there were other, obvious, display limitations.

I would like to use a regular HTML table, with hyperlinks for the scripts, but though I can limit a table to only 10 rows, I can't give it a scrollbar. Putting a table inside a frame has been suggested... but I'm not sure if that is the best path.

  • 3 weeks later...
Posted

As a follow up for those of you who were interested, I have used the HTML iFrame to produce the functionality of a FileMaker Portal. I wrote a separate .xsl file (eg: portal.xsl) to create the table-like appearance of the portal. Then in my main page, I create an iFrame (the html for doing so is pretty easy) and set its src equal to the portal.xsl file.

This topic is 7027 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.