Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Not the CurrentSkip, the "Next Skip"

Featured Replies

I'm fairly new to building Web pages in HTML, and quite new to CDML.

I'm in a situation where I need to do essentially what the [FMP-LinkNext] tag does, but without actually using the tag. The key function of the [FMP-LinkNext] tag is to generate what you might call the "next-skip" value, and it's that value I need access to.

------------------------------

I'll explain what I mean. Let's say the following CGI command gets issued (I've broken it into 2 lines for legibility):

code:


fmPro?-db=TestProducts.fp5&-Format=ProdNav.html&-lay=Images&

-Max=10&-Skip=30&-findall

What I get back is data records 31 through 40, merged with the format file ProdNav.html. Now if that file contains the expression

code:


[FMP-LinkNext] Next [/FMP-LinkNext]

this will appear in the returned page as:

code:


<a href="fmPro?-db=TestProducts.fp5&-Format=ProdNav.html&-lay=Images&

-Max=10&-Skip=40&-findall"> Next </a>

This shows what [FMP-LinkNext] does: it turns into a link where the HREF is the same as the CGI command that generated the current page, except there's a new Skip value. In my example, it will have -Skip=40 instead of -Skip=30. That "40" is what I call the "next-skip" value. It's always the case that "next-skip" = CurrentSkip + CurrentMax.

------------------------------

Here's my problem: For reasons I'll explain below, I need to compose my own CGI command so that I can pass that "next-skip" value on its own via a token.

Is there any way to access that value? Any way to build it into a Get or a Post? There's no [FMP-NextSkip] tag, and I can't see anything else along those lines. Is there anything else I can do? As I've noted, the value I want is the sum of two tags that do exist -- is there a way to calculate this on the fly?

------------------------------

The background for this problem is a fairly interesting project in which I'm using CDML in the context of a frameset. I'm building a tool for users to proof the contents of TestProducts.fp5. There are 350+ records, and users need to proof a relatively small number of fields for each record.

Purely as a design preference, I want to use the List-and-Detail style of presentation. That is, I want a list of product names down the left side where you click a product name to see the details on the right side. Of course, this requires frames, which is what's making this such a darned interesting project.

The SRC attribute for the left frame is roughly the CGI command I used in my example above, which uses ProdNav.html as the format file. The SRC attribute for the right frame is slightly different and uses ProdDetail.html as the format file. The ProdNav format file displays a list of product names, and clicking a product name displays the requested detail in the right frame, as specified by the target attribute in the <a> tag:

code:


[FMP-Record]

<p><a target="Detail"

href="[FMP-LinkRecID:Format=ProdDetail.html,Layout=Images]">

[FMP-Field: ProductName, raw ]

</a></p>

[/FMP-Record]

Again as a design preference, I prefer not to list all 350 product names in a scrollable left frame. To eliminate the scroll bar, want to list products in sets of 10, (hence the -Max=10 tag) but this is where my problem arises. Normally in this situation, you would use FMP-LinkNext (and FMP-LinkPrevious), but with frames that would be a problem: clicking the FMP-LinkNext link will change from products 31-40 to 41-50 in the left frame, but it won't simultaneously show the detail for record 41 in the right frame, which will be puzzling to the user.

In other words, I need to change the content of both frames at the same time. To do so, need to I use a technique that I've successfully used elsewhere: a CGI command that specifies the *frameset* as its format file. As I've indicated above, the frameset file specifies two frames, each with a CGI command as its SRC attribute. (Both commands are sent to the Web Companion as the frameset loads into the browser.) When I call the frameset -- either from the home page or from one of the frames -- I use tokens to supply the parameters used by those two commands.

I know this might seem a little twisted, but it is fun, and the technique is sound. What's stopping me here is that both CGI commands in the frameset need to specify the *new* Skip value -- the so-called "next-skip" value which was 40 in my example. If I could send this value as, say, Token 5, then the CGI commands in the frameset could say &-Skip=[FMP-CurrentToken:5]. Unfortunately, I can't see any way to pass the needed value to a token.

(I also acknowledge that I could avoid this problem by changing one or more of my "design preferences," but if you've read this far then hopefully you agree that it's an interesting problem in its own right.)

Thanks for any suggestions you can provide.

-- John White

------------------------------

By the way, the latest FM Pro Advisor issue (March 2002, pp 32-39) has an interesting discussion about using the List-and-Details approach in interface design. It's more about designing FileMaker layouts than Web pages, but there's lots of overlap, of course, and it's well written.

[ March 26, 2002, 08:04 PM: Message edited by: John White / IFC ]

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.