Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hello everyone

I asked a question earlier this year about creating a page navigator, or what ever it's called, with CDML. No one answered, maybe there is no other answer than silence?

But still I would like to create exactly the same type of:

Page: 1 2 3 4 5 6 7 ...

as the one that appeares on these pages when I select "Show topics from last ..."

There is an example in the tidb.filemaker.com-collection. But it involves loads of CDML-code, and you basically need to predefine every possible number of hits.

There just must be an easier way than:

[FMP-IF: CurrentFoundCount .gt. 0] 1 [/FMP-IF]

[FMP-IF: CurrentFoundCount .gt. 25] 2 [/FMP-IF]

[FMP-IF: CurrentFoundCount .gt. 50] 3 [/FMP-IF]

[FMP-IF: CurrentFoundCount .gt. 75] 4 [/FMP-IF]

[FMP-IF: CurrentFoundCount .gt. 100] 5 [/FMP-IF]

...

[FMP-IF: CurrentFoundCount .gt. (whatever)] 600 [/FMP-IF]

And what if my search returns 609 hits, or 700 or more? I can increase the .gt. value to 50/100/... or even more. But that is the answer some other question than mine. In my case .gt. 10/20... is a optimal number to show.

Is the CDML solution to my problem Lasso (in other words not CDML)?

TIA

Anders

Posted

I would use lasso, to se up a loop that would loop for a calculation, the calculation would be a divisiable factor to your current found count. I.E.,

(int([FoundCount]/25) +1)

would determine how many times it loops ( the syntax is incorrect for lasso, but use the functionality.)

in the loop you would add 1 to a variable/ i++ / or such.

Posted

Placed on a format file, the conditional which you are proposing:

[FMP-IF: CurrentFoundCount .gt. 0] 1 [/FMP-IF]

[FMP-IF: CurrentFoundCount .gt. 25] 2 [/FMP-IF]

[FMP-IF: CurrentFoundCount .gt. 50] 3 [/FMP-IF]

[FMP-IF: CurrentFoundCount .gt. 75] 4 [/FMP-IF]

[FMP-IF: CurrentFoundCount .gt. 100] 5 [/FMP-IF]

could display either 1, 2, 3, 4 or 5. Of course, since 101 is .gt. 0, 101 might generate 1,2,3,4, and 5. Of course, as a developer, you can test this yourself.

To achieve this display, you will need to use an appropriate number of [fmp-else] and [/fmp-if]

Posted

Hi Keith

My problem is that the database I'm working with contains close to 3000 records, and growing. I'd prefere to show 10 records/page, and a search result of more than 450 records are not at all unheard of. Not optimal but may that well happen since the users aren't experts in searching databases.

This would mean that I need at least 45 rows of [FMP-IF]'s, well not necessarily one [FMP-IF] per row of course; and if someone makes a search that returns more than 450 records the last digit will still only represent hits 440-450. Today I use [FMP-LINKNEXT] to be able to get beyond the limit that in my case is [FMP-IF: CurrentFoundCount .gt. 70] | 8 [/FMP-IF], but all this code feels somewhat unprofessional.

The Lasso principle mentioned by Hudson seems like a reasonable way to go. But I have no Lasso-experience at all.

Then again I'd probably need a script of some kind that works like a Google-search page navigator, it would be pretty crowded at the bottom of the page if all page numbers where to be shown at the same time in a big search result. Google solves this by returning different page navigators depending on which hits you are whatching, and a maximum of 20 numbers at the same time.

Wrong forum, but since Lasso is mentioned: Is Lasso faster in searching FM-databases than Web Companion? I'm not using the fastest computer in the world as a server, and was wondering if Lasso may improve on speed when returning search results. I have heard occasional complaints from people, but it may come down to them using slow modems.

Thanks

-Anders

Posted

Lasso might be slightly faster by returning result, but the find itself is done in FileMaker I believe.

But by better design I just decreased searching time in one database from 15 seconds to < 1 sec.

FileMaker is blazingly fast in searches. I did tried find on 1 000 000 records; very fast...

Posted

I don't know that I would bother with the [fmp-if] structure you are proposing. I think I would consider a -find with a display of -max of 20 used in conjunction with the [fmp-next] and [fmp-last] tags. If your clients can't use the "next", "previous" links then I feel sorry for them. Of course, there is nothing quite like scrolling through a single list of 250 or even 25,000 records.

If too many records are being found to be practical, perhaps the find criteria need further considerations.

Speed of finds varies. Some of it seems to depend on the size of the field being searched. I have personal db's (which are not web activated) which have over 26,000 records which can contain well over 100 different fields of data per record. Searching a field with a lot of data takes a lot of time. Searching a field with a small amount of unique data is very quick. When searching a field containing symbols such as an asterisk, it is best to avoid the use of that symbol and stick strictly with the text.

[ October 07, 2001: Message edited by: Keith M. Davie ]

Posted

Hello Keith & Anatoli

In principle I agree with you Keith, if the system had been aimed only for me I would be more than satisfied with Previous/Next, since I believe I know how to search my database. But then again, its not.

Our library maintains, among others, a collection of useful links on the Internet, collected in a FM-database. You can search it through different means, one of them by clicking links representing general keywords (like medicine, technology, economics etc). When clicking one of these links you get lots of hits.

It is not the optimal way of searching, but we have all kind of users, from PhD's in computer science to people who possesses only rudimental computer skills. And among other things it is our duty do guide them into the mysteries of the information era. Clicking a link is among the first things people learn when it comes to a PC/Mac. And when one doesn't know where to look on a page, this kind of navigator counting the number of hits at least gives some comfort.

But I must face the fact that Web companion and CDML just can't do the trick. It is still a great system. Perhaps I'll give Lasso a try.

Cheers

Anders

Posted

I've done this, and it does use a big chunk of CDML code. But so what?

Regarding 3000 records, how many people are actually going to look at them all? If ther are just links or one-lineers, maybe having 100 on a results page is OK. That brings a 3000 record database to 30 pages, 450 results to just 5 pages.

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