Jump to content

Example file of "GoToPageNumber"?


Diana, Cda

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

Recommended Posts

Does someone have a file that shows a "GoToPageNumber" function?

I'm having a lot of problems with this one because I'm such a newbie and the help file does not have instructions at the beginner level.

I have a global field called "gPageNumber" (I've had help, obviously! <g>). The whole thing is awkward in terms of for the user and also, despite putting sort commands, the results are getting jumbled up. So, if data is correctly sorted to begin with, it gets scrambled despite a sort that works.

It's a db with page #'s and references on a page, i.e., a, b, c, d so end results should have everything sorted by page #, item # on page and then by title, Example, if I need to get to page 85, then, this process should get to me record 85a. 84c, 84b, and 84a would be follow below, backwards all the way down to 1a as first record. And then after 85a should follow 85b, 85c, 85d, 85e, 86a, whatever. Perfectly sorted but starting at requested page defaulting to item a.

Is it because there are item #'s? Is that screwing the whole thing up because I might have more than one page of each number?

Anyway, a big, big thing is also to have this in a more normal setup. It would be best if the "Go to Page" button opens up a popup where user could enter page number and then press OK or CANCEL. Is this possible?

I've read instructions till my eyes are dry and fiddled over last couple of days so hoping that someone has a db that already has this function built in so that I can see it in action.

Thanks very, very much! crazy.gif

Link to comment
Share on other sites

> Anyway, a big, big thing is also to have this in a more normal setup. It

> would be best if the "Go to Page" button opens up a popup where user could

> enter page number and then press OK or CANCEL. Is this possible?

Forgot to mention that for speed, obviously OK would be accessible by pressing ENTER as well, as per normal. Tx!

Link to comment
Share on other sites

You are really trying to go to a record which represents the first item on a page. There are a few ways of doing this. The easiest is to set up a relationship between the global page number field gPageNumber, and the regular page number field Page#. Then you can enter a page number into the global field and do a Go To Related Record command. This will take you to the first record for the chosen page.

Also, you will need to sort your data before you execute the above steps, and you will need to set the sort order in the relationship definition to that same sort order.

Link to comment
Share on other sites

Yes no problem. Just change the field format from popup menu to standard field.

The only thing to bear in mind is if you are using a list view to display your records, you can't enter the page number in a global field in the header. You have to switch to a form view layout to do it (or if you are using FM version 6 you can use a custom dialog).

Link to comment
Share on other sites

YES! That was what I was hoping for, a custom dialogue. The thing is that your example is great, but it's a view that is different from the main db input I have. I'm hoping that the user doesn't have to go out of this main layout? that this can be done so that a box pops up to allow for input of the page number and then one can press enter (like in Word, for example, just to give an example). Thank you. I'm very sorry I'm such a newbie. I go to the help file to look each time but don't have much luck. I guess what I need to do is always too specific and/or I lack the terminology so do not look for the right thing. I'm going to try to see how to adapt your example to my db. I didn't know there would be such a different way from presenting the solution. FMP's very flexibility makes it difficult to work in sometimes for the newbie.

Cheers!

Link to comment
Share on other sites

Argh, I'm ready to tear my hair out. I see why you put a pulldown, unlike a normal GoTo in an app, there seemed no way to get the cursor into the field ("Enter Browse" didnt' seem to work here). You have to click to activate it. No good. Then there was no way just to press Enter. Had to actually click the GO button in the layout. Very limited, too.

Am I asking too much of FMP? I, literally, wanted to find an example in someone's db that had this feature but that looks a lot like the Word "GoTo" without all the find/replace extras.

What that means is that in FMP, you're in your main layout, editing. You happen to have page numbers in the db example (the item on that page is unique, re sorting, though this was commented on already, so that's okay). You press a key to navigate to a found page number and a box pops up with a field where you'd just type in the page # (no need to click into it first), then you press enter. Is there no way to do this in FMP? I can't think that would be the case. I've been editing my db and this is sorely missing. I couldn't put this out as freeware without that. It would be shoddy work. I'm on the net looking for info on the custom dialog box but I've been this route before. It's going to take a long time, and it's very unlikely I'll find help. Still, going to do that in the meantime.

Thank you. I know the answer is somewhere. I wish I had the cash to buy a manual, but they're so expensive and the places I went to see what they had didn't yield anything good.

Link to comment
Share on other sites

Thank you! You are so very kind to go to all this trouble. I appreciate it. Thank you for showing me how to get the cursor into the global field. I saw the coding in the script, that's great! wink.gif

I'm thinking that the solution does lie in a custom dialogue box; however, is it true, though, that I need a plugin in order for this to work (seems odd to me)? That's what someone felt was the case. Do you know, by any chance?

This has been a good exercise. I'm still so new to this side of the fence that it's always so surprising the things that I come across <g>. But I get better at figuring out what is needed. I'm finding that I definitely need a GoToPage very similar to what is found in any wordprocessing program. That means that the layout stays _absolutely_ the same, only that a box comes up requesting number and user hits _regular_ enter key. I find that that's the only thing that will work in this case. I also don't want to change the layout to a special "GoTo" page. And I fear that making a small layout that pops up in front of the main one to mimic that may mean a portal situation (?) and I want _again_ to keep things easy for the user by having only _one_ file for this db to keep track of. Portals mean more than one. I don't like those at all, no matter how much better they may be purported as being. But what's up with a plugin, I wonder? smirk.gif

Thank you so much for your help. It's tremendous. Both these files have been saved to my "help files" folder. laugh.gif

Cheers!

Link to comment
Share on other sites

Version 6 has the custom dialog feature built-in. So, you don't need a plug-in. However, there are several plug-ins available that do provide more features than what FM 6 has, but for what you want to do (assuming you are using version 6) then the custom dialog it provides should be enough. See the new example attached.

JumpToRecord3.fp5.zip

Link to comment
Share on other sites

Alright!! Yes, that's exactly what I needed! The popup box is absolutely perfect! I even got it to work 50%! I'm fine up till the user adds input <lol>. It doesn't go anywhere, so I know I'm missing something very vital. I'm attaching an empty clone of my db so that the actual file can be looked at. I'm guessing that it's the differences in the two types of layout, between the example and mine, that have me stumped as I can't see where I've gone wrong.

So, if someone could take a peek at the solution, I'd really appreciate it. Pls bear in mind that I have practically zero knowledge, but that despite that, have managed to put this together with a lot of help in a few of the trickier items but that I might not understand a very technical explanation.

********

p.s., one thing I did notice was that in this clone, the button mask doesn't work re the "find". Everything seems to be in place, but the "Perform Find" button appears. <shrug> Don't know why that's so. Also, this solution is still very raw and requires a lot of work so not everything other than in the main "B" interface is as it should and, hopefully, will be. In case there were any questions on it.

Thanks heaps, everyone! grin.gif

Recipe Cataloguer.zip

Link to comment
Share on other sites

You had a couple of errors in the go to page script see the comments below:

Show All Records

Sort [ Sort Order: Page # (Ascending) # on page (Ascending)

.....Recipe title (Ascending) ] [ Restore sort order, No dialog ]

Set Field [ gPageNum , 1 ]

Go to Field [ gPageNum ] [ Select/perform ]

Show Custom Dialog [ Title:

Link to comment
Share on other sites

Thank you! I knew I would have to have some glitches but the one re the global was unintentional and I don't know when that happened. It was a global field. Somehow, somewhere, it got turned off and I really didn't notice that I did something to cause that. In fact, it took 3 times just now to get it to stay as a global. Hmmmmm, I will definitely remember next time, if this happens again, to look into that. It seems like a sensitive thing this.

Thank you re the script. That's odd; I thought I'd put it in <g>. Great that you could help out and see easily see where I went wrong. I'm still finding that aspect tough when there is so much to remember and see to. But tis GoToPage task is done!! Yeay!! It's working so very beatifully! And in the end, quite "easy". The rest of the db shouldn't come close to being this hard (I hope <fingers crossed>).

I have a ton of work left to do. In fact, I followed one of the templates to make this solution. Vestiges of that fact are left, i.e, having the reports accessible from a reports menu (and the ugly buttons). How roundabout and inefficient that is. One major change is to put all the report buttons at the bottom of the two main interfaces. Much more efficient!

Thank you very much!! smile.gif This solution is vital for people like me who have extreme dietary requirements. It's a way to track _all_ sources of special recipes easily and quickly via a simple method whether photocopies, internet printouts or books. With diligent work, hope to publish this as freeware within next 6 months for diabetics and others with health issues.

Cheers!! wink.gif

Link to comment
Share on other sites

The problems weren't obvious, so I did what I usually do when debugging. I put some Pause/Resume steps in the script and watched what was happening. That's how I noticed that the IF[ ] statement wasn't working. That's just about the best way to find why things don't work.

It would likely still have worked okay with gPageNum defined as a regular field, but it should be a global just to prevent any strange behavior.

Link to comment
Share on other sites

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