SaturdaySoftware Posted December 2, 2008 Share Posted December 2, 2008 Hi, this is what I have: a table (NAMES) with a relationship that is connected by a unique number with the X option (showing all records in the portal). [color:brown]My "problem" Nr. 1: after a FIND the related database still shows all records, what´s the trick to synchronise these 2 tables? I want both tables to show the same data, i. e. if I'm showing only names in "Frankfurt", the relation should behave the same. [color:brown]My "problem" Nr. 2: I have a script (got to record next) to move within the table and want to move within the portal. When all records are shown, a "Go to Portal Row[select, recordnr]" works ok. This of course does not work if a FIND is aktiv. So I tried the script step LOOP and searched for the RECORDID. This works just fine, but is a tad slow since all records have to be checked. Any ideas, appreciate your help!! Link to comment Share on other sites More sharing options...
mr_vodka Posted December 2, 2008 Share Posted December 2, 2008 You can not use the cartesian product and not expect to get back all records. It doesnt care about your found set. What you are trying to do is show all records in the portal that are in your found set. You will need to have a calc on the parent side of the self join that returns a list of the curent found set's primary key IDs. This may help. http://fmforums.com/forum/showtopic.php?tid/197149 Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted December 2, 2008 Author Share Posted December 2, 2008 Thanks John! I really did try to find an answer before posting, didn't find this. Thanks 4 the help. I'm new to this Filemaker stuff and not really firm with the syntax just yet. "David Kachel's White Paper for FM Novices" way ahead of you on that one. Have it already printed out, just have to read (and understand?) it now. Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted December 2, 2008 Author Share Posted December 2, 2008 Oooops, I only have a "regular" FM 9 PRO and I can't use custom functions like CollectFoundSet(). :P Link to comment Share on other sites More sharing options...
comment Posted December 2, 2008 Share Posted December 2, 2008 You can use a repeating calculation field instead of a custom function to create a portal of the found set - see: http://fmforums.com/forum/showtopic.php?tid/182509/post/231005/#231005 However, I don't see the point of this elaborate synchronization between the two. Instead of finding, you could filter the portal by some criteria (e.g. City ="Frankfurt"), select the record you wish to view, and display its data through a second relationship - all this without moving anywhere. Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted December 3, 2008 Author Share Posted December 3, 2008 (edited) "http://fmforums.com/forum/showtopic.php?tid/182509..." tried that with 1500 records, it's pretty slow!!! Is there a way to read the find criteria and apply it to a second table? The "Frankfurt" example is just to simple. Is there a way to "know" what the user is searching for? Edited December 3, 2008 by Guest Link to comment Share on other sites More sharing options...
comment Posted December 3, 2008 Share Posted December 3, 2008 tried that with 1500 records, it's pretty slow!!! I don't know - it seems fast enough to me, and I have a relatively slow computer. If you want it faster, you will need to script Copy All Records. Is there a way to "know" what the user is searching for? In a way, yes: you can do Modify Last Find and read the criteria, field-by-field. Not sure what you can do with this, though, in terms of filtering a relationship. I am still puzzled regarding the purpose of all this. Usually, you would filter a portal by letting users select some value/s in global field/s, e.g. "show only records from [select a city]". FoundSetPortalR1500.fp7.zip Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted December 4, 2008 Author Share Posted December 4, 2008 Hi Comment, VERY COOL!!!, works realy well. The thing that does not work so good anymore, is my script to i. e. find the first name that starts with letter X. This has slowed down heavely!! I know I'm beeing a pain, but . How would you implement (into your example) a routine to find the first record that STARTS with a given Letter. For instance: Go to first Table:lastname that starts with "S". Link to comment Share on other sites More sharing options...
comment Posted December 4, 2008 Share Posted December 4, 2008 I wouldn't. I would use a different technique altogether. You still haven't explained what is your purpose, and why do you need to duplicate the found set in a portal. Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted December 4, 2008 Author Share Posted December 4, 2008 I just have the fields to edit above a portal that shows a list of all names in the database. With your help I now have a portal that behaves just like the dataset above it. So after a find, the portal has only the data of the find. Very cool!! I only have about 2000 records, but I would like to just press a button to jump to the first name that starts with "S". I tried the "S...T" thingy, that returns records that start with "S", but also those that have like a second or third word in the "lastname" field that starts with "S". This also finds "Oris SA" because of the "SA" in the name. Otherwise this is just about what I want, except it should only show names that actually start with "S". There is no "left" function for this, or am I just missing it? Link to comment Share on other sites More sharing options...
comment Posted December 4, 2008 Share Posted December 4, 2008 (edited) I'm afraid I still don't get it. I would either do my navigation in the portal, or in the found set. Doing both seems like a redundant duplication of effort. In any case, you can find records that start with "X" by searching for "==X*" (without the quotes). Or you could forget about the found set portal, put "X" in a global field, and set the relationship to show only records whose name is ≤ than the global. See also: Portal row scan by alpha Edited December 4, 2008 by Guest Link to comment Share on other sites More sharing options...
SaturdaySoftware Posted December 4, 2008 Author Share Posted December 4, 2008 Hi Comment, this looks very, very promising. It's late at night here in Frankfurt, so I am going to try this tomorrow. Thanks in advance, Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5760 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