![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have found a number of examples on how to do this but I can not seem to apply them to my database. I am a new user of filemaker pro previously used access. I have a parent file (Main) and a Child file (Litter). Related by Box#. I want to view information from Litter in Main via a portal. In Litter there are a number of fields that have repeated information. eg Box# - 1 Litter# - 1 #WT - 5 Toe# - 1 Box# - 1 Litter# - 1 #WT - 5 Toe# - 2 From this example you can see that there is only one difference the toe#. If I make a portal in Main with the relation Box# and the fields that I know are repeated ie Litter# and #WT (the portal will only be used to view repeated values) Litter# and #WT will come up as many times as there are toe#. I only want to see it once. Therefore I will be able to view Box# 1 Litter# #WT 1 5 2 3 3 6 Not Box# 1 Litter# #WT 1 5 1 5 1 5 1 5 2 3 2 3 2 3 3 6 3 6 (Box# is on the main form). ie I want the portal to act as summary of repeated information. Note: There is more than the one field that is not repeated, these fields act as a caculation for the fields that I want in the summary. ie there is a field were you enter genotype with a drop menu, WT being one answer. This is used to caculate the #WT field that I want in the summary. Point of this, repeations of data are required. If anyone has any ideas I would be entirley grateful for your help. Kathryn |
#3
| |||
| |||
|
|
I have found a number of examples on how to do this but I can not seem to apply them to my database. I am a new user of filemaker pro previously used access. I have a parent file (Main) and a Child file (Litter). Related by Box#. I want to view information from Litter in Main via a portal. In Litter there are a number of fields that have repeated information. eg Box# - 1 Litter# - 1 #WT - 5 Toe# - 1 Box# - 1 Litter# - 1 #WT - 5 Toe# - 2 From this example you can see that there is only one difference the toe#. If I make a portal in Main with the relation Box# and the fields that I know are repeated ie Litter# and #WT (the portal will only be used to view repeated values) Litter# and #WT will come up as many times as there are toe#. I only want to see it once. Therefore I will be able to view Box# 1 Litter# #WT 1 5 2 3 3 6 Not Box# 1 Litter# #WT 1 5 1 5 1 5 1 5 2 3 2 3 2 3 3 6 3 6 (Box# is on the main form). ie I want the portal to act as summary of repeated information. Note: There is more than the one field that is not repeated, these fields act as a caculation for the fields that I want in the summary. ie there is a field were you enter genotype with a drop menu, WT being one answer. This is used to caculate the #WT field that I want in the summary. Point of this, repeations of data are required. If anyone has any ideas I would be entirley grateful for your help. Kathryn |
#4
| |||
| |||
|
|
In article <8f1ffc44.0406292314.2c9ab773 (AT) posting (DOT) google.com>, kafjob (AT) hotmail (DOT) com (Kathryn Fletcher) wrote: I have found a number of examples on how to do this but I can not seem to apply them to my database. I am a new user of filemaker pro previously used access. I have a parent file (Main) and a Child file (Litter). Related by Box#. I want to view information from Litter in Main via a portal. In Litter there are a number of fields that have repeated information. eg Box# - 1 Litter# - 1 #WT - 5 Toe# - 1 Box# - 1 Litter# - 1 #WT - 5 Toe# - 2 From this example you can see that there is only one difference the toe#. If I make a portal in Main with the relation Box# and the fields that I know are repeated ie Litter# and #WT (the portal will only be used to view repeated values) Litter# and #WT will come up as many times as there are toe#. I only want to see it once. Therefore I will be able to view Box# 1 Litter# #WT 1 5 2 3 3 6 Not Box# 1 Litter# #WT 1 5 1 5 1 5 1 5 2 3 2 3 2 3 3 6 3 6 (Box# is on the main form). ie I want the portal to act as summary of repeated information. Note: There is more than the one field that is not repeated, these fields act as a caculation for the fields that I want in the summary. ie there is a field were you enter genotype with a drop menu, WT being one answer. This is used to caculate the #WT field that I want in the summary. Point of this, repeations of data are required. If anyone has any ideas I would be entirley grateful for your help. Kathryn It depends what you're going to do with this list. If you're trying to print a report, then do not use portals. Instead print the report from the Litter file using Sub-summary parts to collate all the same Litter# records for each Box#. If you're only wanting to display the records on-screen via the portal, then off the top of my head, with no testing ... You could create a new self-relationship and a couple of new fields in the Litter file that are used to work out which is the first entry of each type which can then be picked up by a new Main -> Litter relationship. First you need to be able to group together all the Litter records that have the same Litter# and Box#. The easiest way is to create a new field that sticks thes two numbers together, but it can't be a calculated field since those can't be used on the child end of a relationship. That means using a normal Text field with an auto-enter calculation. eg. Box#Litter# {text, auto-enter calculation} = If (IsEmpty(Box#) or IsEmpty(Litter#), "", Box# & "-" & Litter#) The IsEmpty functions are needed to ensure that the Box#Litter# field only calculates when both of the source fields contain data (there seems to be a bug in some versions of FileMaker where the "do not calculate if fields are empty" option doesn't always work). This enables you to create a self-relation within the Litter file to group all the same related records together. eg. LitterGroup {relationship in Litter file} Box#Litter# = Litter::Box#Litter# You can now create another new field in Litter to indicate whether a new record is the first in the group or not by using the Count function. Again this must be a normal text field using an auto-enter calculation since it will be used as the child end of a relationship from the Main file. eg. FirstRecord {text, auto-enter calculation} = if (IsEmpty(Box#) or (IsEmpty(Count(LitterGroup::Box#))), "", Box# & "-" & Count(LitterGroup::Box#)+1) For each individual Box# this field will put a "-1" after the Box# of the first record, "-2" for the second, etc. Next, in the Main file you will need to create a calculated field that joins Box# and "1" together eg. FirstRecordSource {calculation, text result} = Box# & "-1" which will enable you to link to the Litter file and obtain only the first record from each group via a new relationship in the Main file. eg. FirstLitter {relationship in Main file} FirstRecordSource = Litter::FirstRecord Use this relationship for your portal and you should (hopefully) get only one of each Litter# for each Box#. Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
#5
| |||
| |||
|
|
I have found a number of examples on how to do this but I can not seem to apply them to my database. I am a new user of filemaker pro previously used access. I have a parent file (Main) and a Child file (Litter). Related by Box#. I want to view information from Litter in Main via a portal. In Litter there are a number of fields that have repeated information. eg Box# - 1 Litter# - 1 #WT - 5 Toe# - 1 Box# - 1 Litter# - 1 #WT - 5 Toe# - 2 From this example you can see that there is only one difference the toe#. If I make a portal in Main with the relation Box# and the fields that I know are repeated ie Litter# and #WT (the portal will only be used to view repeated values) Litter# and #WT will come up as many times as there are toe#. I only want to see it once. Therefore I will be able to view Box# 1 Litter# #WT 1 5 2 3 3 6 Not Box# 1 Litter# #WT 1 5 1 5 1 5 1 5 2 3 2 3 2 3 3 6 3 6 (Box# is on the main form). ie I want the portal to act as summary of repeated information. Note: There is more than the one field that is not repeated, these fields act as a caculation for the fields that I want in the summary. ie there is a field were you enter genotype with a drop menu, WT being one answer. This is used to caculate the #WT field that I want in the summary. Point of this, repeations of data are required. If anyone has any ideas I would be entirley grateful for your help. Kathryn |
![]() |
| Thread Tools | |
| Display Modes | |
| |