Jump to content
Server Maintenance This Week. ×

Moving to next record...


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

Recommended Posts

Doh.. I thought that posting this in the "CDML" section came with the assumption that I'm doing custom web publishing, not instant. I wanted to mimic the functionality in instant, but I see they are using the 'skip' method I stated above..

Anyone else know a way to do it differently?

Link to comment
Share on other sites

Sounds like you're wanting to load all of the search results at one time and then use the browser to sequentially cycle through them?

I can think of 2 ways to approach this. The first is by using the HTML anchor function to jump to sections of the page. The second would be using Cascading Style Sheets - load each record in a seperate layer, make only one visible, then cycle through the records by toggeling the visibility attribute.

Link to comment
Share on other sites

This is how I'm doing it:

1. Do a find

2. Search results are viewed in table view all at once

3. Click a link (record ID) to get to a form view of that record.

4. At the top of the page, I want a previous and next button that will take me to the previous and next records in the found set.

The web companion does this buy creating a link using the -skip tag, but it just increments that tag. I'm having a tough time figuring out how to increment that tag...

Can you increment that tag?

Link to comment
Share on other sites

Hey, that's kind of useful - I put it on one of my pages!

Here's what I did:

1.In your database define a skip field as a non stored calculation: Status(CurrentRecordNumber)-1

2.Don't use the standard [FMP-LinkRecId...] link from the search result page to get the detail record. Instead spell it out with "-max" and "-skip" parameters:

<A HREF="FMPro?-db=mvhs&-format=/MVHS/detail.html&-lay=simple&-sortfield=Last%20Name&-op=cn&Graduation%20Year=1978&-max=1&-skip=[FMP-Field: skip]&-find=">

3. Put the following at the top of your detail record page:

[FMP-LinkPrevious]Previous[/FMP-LinkPrevious] | [FMP-LinkNext]Next[/FMP-LinkNext]

Link to comment
Share on other sites

I want to show one record at a time after a search is completed. At the top of the page, I want to be able to move to the next or previous records from the search, just like 'web companion' does with instant publishing... question is:

When I do a search and have a set of found records, how can I move to the next record in the found set?

Do I have to do something really ugly like have a variable that keeps a 'skip count' and do the same find everytime with -skip placed in the URL?

thanks

Link to comment
Share on other sites

This topic is 8606 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.