Pablo Ramirez Posted February 7, 2003 Posted February 7, 2003 Is it possible to show omitted records in a portal?. What I am trying to do is copying the data from a portal with a script and then paste it into another field. I thought that sorting the master file would also sort the portal but ..... didn't happen. I sorted the master file using the omit command and finally got what I wanted but how do I sort the portal in order to show the same sort I did with the master file? Thanks in advance Pablomac
Ugo DI LUCA Posted February 8, 2003 Posted February 8, 2003 I sorted the master file using the omit command and finally got what I wanted but how do I sort the portal in order to show the same sort I did with the master file?Is it possible to show omitted records in a portal?. Well, I think you need some clues here. First of all, a portal show ALL related records from the Main File , not just the current found set, except if this one has been flagged (see later). There are several sorts of "Finds" that can be performed with File Maker Pro. [color:"red"] 1. The Find Mode : a) Find for all records with "Pablo" in the Name field. Entering "Pablo" in the Name field and perform find in your Master would display a list of all records with "Pablo" in the Name file. : Find for al records with "Pablo" AND "Date" in the Name field. Entering "Pablo" in the Name field and 02/08/2003 in the Date field will reduce the find to the records with both "Pablo" and "02/08/2003". c) Find for al records with "Pablo" OR "Date" in the Name field. Entering "Pablo" in the Name field, then adding a find for "02/08/2003" in the Date field will give you a list of all records with Pablo + a list of all records with "02/08/2003". [color:"red"]2. The Omit function : The Omit function will reduce any list "omitting" the record(s) selected from the found set. [color:"red"]3. The Relationship(s) : [color:"blue"] A- Using a relationship from the same file a) Find for all records with "Pablo" in the Name field. Use a selfjoin 1 on Name - Master File:Name::Master File:Name. and script "go to related records" (using selfjoin 1 for relationship and "show only related records) While you are in a record with "Pablo" in the Name field, performing this script will show a list of all records with "Pablo" in the Name field. If you had unchecked "show only related records" in, the script would lead you to the first record with "Pablo" in it (still with the same found set). : Find for al records with "Pablo" AND "Date" in the Name field. Use a selfjoin 2 on Namedate* - Master File:c_Namedate::Master File:c_Namedate. and script "go to related records" (using selfjoin 2 for relationship and "show only related records) *c_Namedate is a concanated calc of "Name" & "Date". Same process than a for the rest. c) Find for al records with "Pablo" OR "Date" in the Name field. This is where the process of find within a relationship is going to be complicated. You will need a "flag" key calculation that will automatically flag the records using Case calculation (this is a Case sensitive relationship !). Then the "go to related records" will lead you to all flagged records. You will see a lot of examples on this forum. [color:"blue"]B- Using Portals* and relationship from the Main file to a File A. a) finding all records within a portal in File A (related to Main File) with "Pablo". This is what is called Filtering Portals. You will need to create : - a global field (call it g_filterName) - a relationship from File A to Main File ---> File A :g_FilterName::Main File:Name - a portal using this relationship. - a value list* (call it filterNameVL) using records from Main File (choose Names obviously). - format the global to use this Value List.* * This is optional. : finding all records within a portal in File A (related to Main File) with "Pablo" and "Date". Quite the same than above, except that you will need a second global field (call it g_filterDate) and a concanated calculation (call it c_FilterNameDate) = g_filterName & g_filterDate. The relationship will be changed to File A : c_FilterNameDate::Main File:c_Namedate When both globals would be filled in with Name and Date, FM will search for an existing relationship and display it in the Portal. c) finding all records within a portal in File A (related to Main File) with "Pablo" or "Date". You will need a script to "flag" the Main file. *This Portal could also be used within the same file. What I am trying to do is copying the data from a portal with a script Actually you won't copy the data from the portal. You will copy the datas from the Main file, that is related to the File A, using the relationship used to display the records in the Portal in File A. Just place an invisible button in the first portal row. Makes it a script "go to related records" and then paste it into another field. Do not use Paste, use the setfield function Setfield the field in File A (your_relationship::the field in Master) I thought that sorting the master file would also sort the portal but ..... didn't happen. Sorting portal is another topic. See DJ's post in the sample section for the most complete example on the Forum. but how do I sort the portal in order to show the same sort I did with the master file Forget about the master file (see above), but you can define a sorting when defining your relationship. See the options in the Menu Define Relationships. I hope all this makes sense for you now...
Recommended Posts
This topic is 7960 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