Diana, Cda Posted November 19, 2003 Posted November 19, 2003 I've worked and worked and worked on this but I can't figure out what's wrong. I'm a real newbie at scripts. All I know is that I've done everything I've been taught in this forum, but script misfires in one area. Specifically, it's the GO TO PAGE feature via the button on the Main interface (currently only in the "Misc" one). I've attached the working file so that the problem can be seen. A brief mention of the 2 types of data, there is "Misc" (Source "M") sourced and "Book" (Source "B") sourced data. When I enter a page # to go to while I'm in the Misc interface that has no corresponding entry under "Misc", if there is one for a book, it'll bring the book one up. It shouldn't do this. It's better to test what I mean. If one presses the GO TO PAGE button in the Misc interfacce and types in, say, 55, the entry that comes up has a "Source B" entry and not an M one. If you quickly go over to the BOOK interface, you'll see that that records comes up with full data. So easy to see it definitely is not a MISC category entry. Can someone pls check over the coding for me? It is very obvsious I've done something wrong but I don't know what. Thank you! Really appreciate it! Recipe Cataloguer - 2003.11.19.zip
Mike D. Posted November 19, 2003 Posted November 19, 2003 I've tried downloading the file, but without success. Can you upload it again? Mike
Lee Smith Posted November 19, 2003 Posted November 19, 2003 Hi Mike, I just downloaded it without a problem. You do realize that, for some reason, they have added an intermediate page that says if this isn't a picture, click here? HTH Lee
Diana, Cda Posted November 19, 2003 Author Posted November 19, 2003 Yes, new forum interface. When they were down, must have been what they were doing. (A few glitches, too though, I noticed today). So is file okay, or should I post it again? I wouldn't want to post it more than once if it's not necessary, of course. Cheers!
Lee Smith Posted November 19, 2003 Posted November 19, 2003 Your file was okay, but I had trouble view it because of the Windows Graphics, also, I didn't have time to check out your problem as I am involved in a project today. Lee
Diana, Cda Posted November 20, 2003 Author Posted November 20, 2003 No, prob. I see that we have a new apple icon for use when posting, so I'm guessing that that and what you mention means that you're trying to view file in Mac and the graphics are messing it up. Does it make a difference what graphic file format is copied into a filemaker database? I don't remember if they actually came from bitmaps vs jpegs. Bitmaps are strictly Windows I know, but afaik, JPGs are cross-platform, so wonder what difficulty could be? Interesting. Never thought of producing a cross-platform solution, btw. Something to think about down the line.
Mike D. Posted November 20, 2003 Posted November 20, 2003 I still couldn't download the file, must be my PC. I'll try it from home on a Mac. Mike
Diana, Cda Posted November 20, 2003 Author Posted November 20, 2003 Darn. What a pain things like that can be. Thanks, Mike. I know it's probably something quite simple, but can't figure it out. Cheers!
Mike D. Posted November 21, 2003 Posted November 21, 2003 Success - I downloaded the file. I'll look at the scripts tomorrow since it is now 1:00 AM. Mike
Oldfogey Posted November 21, 2003 Posted November 21, 2003 There is no reason why your script should select 'M' just because you are on your Misc interface. At a first guess (because I'm not 100% certain of what you're trying to do) I'd say you need to have two relationships, one for each source. Very crudely - gMPage::MPAge Number gBPage::BPage Number MPage Number would be defined as Case(source = "M", page #, "") similarly for BPAge Number. Hope this makes sense. Cheers, Paul J.
Diana, Cda Posted November 21, 2003 Author Posted November 21, 2003 Paul J, hi! Believe me when I tell you that I don't know why either, only that those commands were given to me by very helpful members here in this forum over the last year. I am not capable of making a total re-write, though. The thought is extremely daunting. I have a feeling that many experts would say I have no business making up a db of my own because of my little knowledge beyond the basics, but it's desperation. I, and others like myself, need this db! So, I muddle along as best I can. So if by the "g" in the above you mean creating global fields, I'm sunk. <sigh> I and friends/family have varying degrees of computer knowledge but they all have less than I do. I need to keep this db simple. I can't stand portals and I never have, not one bit. I don't care how wonderful or effective they're supposed to be. This comes with bad experiences with multiple files, the worse being one job where we were in Lotus. It creates multiple files _every_ single darn time! In that job, out of about 20 dbs, there were only 2 or 3 that were intact! No-one understood the concept of every solution having, I think it was, 3 files!!! Can you imagine?? So very easy for files to get lost along the way. And, of course, the dbs then don't work worth beans! And I was asked, as a simple clerk, to inventory the entire floor's entire computer/peripherals using, God forbid, Excel! I refused point-blank, something I'd never done before, nor needed to do since. I told them I would gladly do so if I could do up a db. They accepted. But what a mess. I had to teach them about the multiple files and how to handle them for backup (me!). And I backed up, myself, a lot through the creation process. I learned to really hate the whole concept of having to have more than one file to deal with, let me tell you! So, that and other subsequent experiences taught me that _one_ file is mandatory for dbs, I don't care how good portals are supposed to be. Hence the problems in keeping two groups of data separate in my single-file db. But I don't care. As long as we get this to work, I and my friends/family who I will give this to will be extremely happy. There are too many of us that have chronic illness that need an easy means of easily accessing all our special dietary recipes, a matter of life/death, really. Sorry to get melodramatic but it's the honest truth. So what is needed here is that when one is in the Misc view looking for a page from misc sources, we cannot be bringing up records from Book sources. To give a parallel to portals, if one were looking at info from portal A, for example, one wouldn't want to bring up info from portal B, right? or vice-versa - no portal A info when in portal B. Same difference here except no portals. As the solution stands now, it's working pretty good in that when going from layout to layout and when doing a search (other than the "Go To Page"), and all the reports, everything though still in raw stages, is working pretty well. Info from each type of data only is brought up that is pertinent. I must admit, though, that the "select" feature you mention didn't always work consistently in separating the data, but in all other cases, just backed that up with a simpleton's workaround by doing a find/sort for M or B at the beginning, depending on the case. (I know, I know, but I didn't want to bother the group more than I have.) But when editing, and I need to get to a certain page, if I type in a page number that doesn't exist in one view, it brings up the page from the other if there is one there (i.e., try page #55 when in Misc, iirc, there is no 55 in M, but there is in B and so that record is erroneously brought up). _NOT_ good. I hope that what I'm trying to accomplish with this "Go To Page" feature is clearer. It's a simple task, really, and if I knew how, know that it would be easy to fix <sigh>. Thanks!
Diana, Cda Posted November 22, 2003 Author Posted November 22, 2003 Hi, everyone! Can someone just pls see the code for the GO TO PAGE. The only thing that needs fixing is for data from source "M" (I'll take care of duplicating everything for source "B" once this is working). The GO TO PAGE will pull up source "B" records even though source "M" is being called for, when there are _no_ "M" records. I've kept trying but don't know where problem lies. I attached the file with the first message in this thread. Thank you and appreciate anyone's time who looks into this. Cheers!
Diana, Cda Posted November 22, 2003 Author Posted November 22, 2003 Hi, I thought I just posted a response but I must have done something wrong as it never appeared. Can someone pls look into the GO TO PAGE feature, pls? It's been seriously affecting editing. Here is the problem simply, In MISC, if I'm looking to get to page X and that record doesn't exist (so there is no source "M" data), if there is a value for that same page number but from source "B", so wrong source (Book versus Misc), then that record is returned even though incorrect. This is not good. But I hate portals and will not use them. All that is needed is to return data from records filtered by whether they're source M and not B. I don't now how to fix this, I've tried. Thank you. I'm not very knowledgeable about scripts that go beyond the basics so didn't make much headway on the advice above. I attached the file in question in the first message of this thread. Thank you.
Diana, Cda Posted November 24, 2003 Author Posted November 24, 2003 Apologize for double-posting on Saturday, didn't realize the menus split so that there was a second page. Got that, now. Pls advise where I can post my solution to so that the simple code for GO TO PAGE can be quickly looked at, pls? Perhaps another of the forums here or somewhere else on the net? I don't know where else to go for help. Thank you, I appreciate any help.
BobWeaver Posted November 24, 2003 Posted November 24, 2003 The file downloaded fine for me. I had a look at the Go to Page (M) script and may have found the problem. It looks like you had intended to start off by finding only the M records, but did not include the Enter Find Mode and Perform Find steps. However, you did include the step where you set the search criteria (setting field Source to "M"). The revised script is as follows: # Do a find here to find only "M" records. # The following Enter Find Mode step was missing. Enter Find Mode Set Field [ Source , "M" ] # The following Perform Find step was missing. Perform Find [ Replace Found Set ] Sort [ Restore, No dialog ] Set Field [ gPageNum , 1 ] Go to Field [ gPageNum ] [ Select/perform ] Show Custom Dialog [ yada yada ] If [ Status( CurrentMessageChoice)=1 ] Perform Script [ JumpToRequestedPageNumber ] [ Sub-scripts ] End If # The JumpTo script will not do anything if the requested page doesn't exist. # So, give an error message. If [ Page #<>gPageNum ] Show Message [ Buttons:
Diana, Cda Posted November 24, 2003 Author Posted November 24, 2003 Oh, thank you! I don't know if you have any idea how nervous one can get when one can't find an answer. I didn't realize I'd missed a step, but I will go and make these changes right now! _Thank_you_ for your time and effort in looking at this. I really, really appreciate it. And yes, the record for pg. 55 _did_ become corrupt somehow and began showing up even where it shouldn't. I ended up deleting it over the weekend and re-entering the data and it seems okay now. But I'll know for sure pretty soon. <crossing fingers> Oh, here's hoping I get this right. If I can get this to work now, afaik it'll be the last major hurdle to get over. I have a lot of work left to do, probably several weeks at a minimum. But all the rest I know how to do and it's just a question of buckling down and doing it. Not a problem since I'll be printing up the db's reports along the way so that I can use. So double incentive. Cheers and thanks once again! I'll report back.
Diana, Cda Posted November 24, 2003 Author Posted November 24, 2003 Bob, hi! By any chance did you test this? And, if so, did it work? I went right after posting my response above and printed out your scripting instructions. I input everything very, very carefully. I get exactly the same results as before. It's worse now, though, source B pages are coming up all the time. However, when there are no page numbers at all in either view, I do get a nice message box that says there are no records but, as can be imagined, this should come up when there are no records also for source M, not when there are _no_ records at all. I'm going to leave this for now as I'm very discouraged and can't see if I've made a mistake somewhere. But will leave the computer for a few hours so that I can come back with a fresh mind (and, hopefully, fresh hope). Thank you!
BobWeaver Posted November 24, 2003 Posted November 24, 2003 When you add the Enter Find Mode and Perform Find steps, make sure that you uncheck the Restore option, or else you will get whatever the last find was in effect when you added the steps. And you don't want that.
Diana, Cda Posted November 24, 2003 Author Posted November 24, 2003 Hi, Bob. Yes, I made sure of that right off the bat. I wasn't kidding when I said I input the code very carefully. Despite not having that in the script, it's not working. Also, as far as I can see, I have as close to your code as is possible but there are some minor discrepancies. i.e., to give just one example, your code above says: Go to Field [ gPageNum ] [ Select/perform ] and mine says _exactly_: Go to Field [select/perform, "gPageNum"] You can see the differences though I was guessing that this might be display issue (?) Either your system is different from mine for some reason, or you were just typing basic syntax and not putting in _exact_ detail, hence the differences. Whatever case may be, db is not working. Despite careful input, it's now always bringing up code from B source, too. Very scary as I don't know what this means and if it's a case of my data now being totally corrupt scares the hell out of me as I've not had luck with copying/cloning. Something always gets broken in the process. I'm going to be in big trouble if I have to delete all the records and start again - if all of this is just corrupting my data more - then I might be really up the creek without ... Thanks, Bob. I went away and had supper. Now I'm going to go completely away and go and read and rest, or something. Then I'll come back and go over the script line by line _again_ and see if I can figure out what I've done wrong. <sigh> I have not much hope at this point. This is such a vital piece in the editing process, I don't know what I'll do if I can't find solution. It definitely cannot be shared without that feature, it just can't. Ah well. Going to go and read and rest for a time, as I said. Thank you very much for your help! Appreciate it.
BobWeaver Posted November 25, 2003 Posted November 25, 2003 Oh wait a minute, I did test it but apparently not thoroughly enough. I just realized that the Jump to page script is using the Go to Related record script step. So, that is going to change your found set. You will need to create a couple of extra fields and another relationship. Rather than give the details, I revised your file and have attached it here. Recipe Cat.fp5.zip
BobWeaver Posted November 25, 2003 Posted November 25, 2003 Just to explain what I did: 1. Created a calculated field cSourcePage that concatenates the source and page number fields together. 2. Created a new global text field gSourcePageNum. 3. Created a new relationship between gSourcePageNum and cSourcePage, which will now be used in the Go to Related Record step. Because this relationship can now only match records that are source M, you shouldn't get and source B records. 4. I added a couple of steps in your GoToPage(M) script to set the value of field gSourcePageNum.
Diana, Cda Posted November 25, 2003 Author Posted November 25, 2003 Bob, yeay, so far so good <relief>!! I thought the solution was a goner in terms of the data! Phew, what a relief. I've been entering new records since last night. 3 different data entry sessions in all so far. And every time I leave the db, I'm able to find the last page I was at to check which # on that page to continue on from. Every single time successful so far. So I'm greatly encouraged. A question, I just need to clarify something - I took a look at all that you did and will study it carefully. But when I go to do the same for book sources, is it as easy as just copying the main GO TO PAGE script for "M" and changing all references of "M" to "B", or must I basically create new global fields for B as well as do that. It's the question of the global fields - do they do double duty or are they pertinent to "M" only? Thanks a million, Bob! You're a real life-saver. Despite the setbacks, I have learned a lot and this db is getting nicer and nicer. Cheers!
BobWeaver Posted November 25, 2003 Posted November 25, 2003 Yes, just change the M's to B's. You can use the same global fields and the same relationship. I called the new relationship "GoToPageNumberM" but just use it as is.
Diana, Cda Posted November 26, 2003 Author Posted November 26, 2003 Super! Thanks, Bob! It's working beautifully. I've spent the time inputing even more entries so it'll be neat to switch over to start working on the book information interface and clean up everything in all menus. Lot of work ahead, but it's working perfectly so far. Couldn't have done it without your great help and all the other input from this forum! Thanks and cheers!
Recommended Posts
This topic is 7671 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 accountSign in
Already have an account? Sign in here.
Sign In Now