Can't Edit Single Portal Row Filemaker
Yesterday when setting up a new layout, I encountered a maddening portal behavior in FileMaker 12 that I cannot figure out at all: On one of my layouts, I am able to edit fields in a certain portal row. Jun 12, 2014 As you likely know, there is a relationship setting that allows you to create child key records from a parent record on the fly. For the most part, this is used in a situation where you can add a new related record by adding information in one of the fields in the last empty portal row.
I forgot to say, I can do this if I copy the field, but is thereanother way?ThanksI have MacOS X and FMP 8.I have table one with two fields: onePK and oneFK.I have table two with two fields: twoPK and twoFK.I know that if I have a portal in table one and make the relationshipto 'Allow creation of record.' Then with the help of the portal acopy of onePK goes onto twoPK in table two.My problem is, can you do this without a portal?
I have tried the'insert calculated results' and it will not copy onePK onto twoPK intable two from table one. Basically the relationship is there, butthe portal is not to do the copying for me.-This list is a free service of OmniPilot Software, Inc.Search the list archives:Manage your subscription. I am not sure what is the best way to do this because I am pretty new to FM8but here is one way that works for me:Create a 'global' field and set the desired relationship value with ascript.
(This is how you are going to pass the related value to the othertable witout using a portal.) Next, have the script create a new record inthe target table and define your related field to do a lookup from theglobal field that you just set at the beginning of the script.Here is a working sample that you can download:on 6/3/06 2:11 AM, Francisco Romero wrote. I forgot to say, I can do this if I copy the field, but is there another way? Thanks I have MacOS X and FMP 8. I have table one with two fields: onePK and oneFK. I have table two with two fields: twoPK and twoFK. I know that if I have a portal in table one and make the relationship to 'Allow creation of record.' Then with the help of the portal a copy of onePK goes onto twoPK in table two.
My problem is, can you do this without a portal? I have tried the 'insert calculated results' and it will not copy onePK onto twoPK in table two from table one. Basically the relationship is there, but the portal is not to do the copying for me.-This list is a free service of OmniPilot Software, Inc.Search the list archives:Manage your subscription.
Can't Edit Single Portal Row Filemaker 1
I have MacOS X and FMP 8. I have table one with two fields: onePK and oneFK. I have table two with two fields: twoPK and twoFK. I know that if I have a portal in table one and make the relationship to 'Allow creation of record.' Then with the help of the portal a copy of onePK goes onto twoPK in table two. My problem is, can you do this without a portal? I have tried the 'insert calculated results' and it will not copy onePK onto twoPK in table two from table one.
Basically the relationship is there, but the portal is not to do the copying for me.In FM8 you can use variables; you'have a script likeSet Variable ($ID, tableone::onePK)Go to Layout ( a layout of table two)New recordSet field (tabletwo::twoFK; $ID)Go back to original layoutA commentIn general table one should not have any foreign key, since - bydefinition - it is a master table; in table two the value of twoPKshould be unique, a serial number or the like, and should not deriveanyhow from table oneCiaoG. PupitaCertified FileMaker 7 DeveloperFSA Associate-This list is a free service of OmniPilot Software, Inc.Search the list archives:Manage your subscription. I am not sure what is the best way to do this because I am pretty new to FM8 but here is one way that works for me: Create a 'global' field and set the desired relationship value with a script.
I am not sure what is the best way to do this because I am pretty new to FM8 but here is one way that works for me: Create a 'global' field and set the desired relationship value with a script. (This is how you are going to pass the related value to the other table witout using a portal.) Next, have the script create a new record in the target table and define your related field to do a lookup from the global field that you just set at the beginning of the script. Here is a working sample that you can download: No, that file is not an example of the technique you just described. The table twoPK you defined is an auto-enter calc that can't work - and it doesn't work, you are overwriting it with your script.Bruce,The file does work as he described. What may be confusing you is his use of PK and FK terminology; when I first looked at his example, I also was puzzled by the setting of TABLETWO::twoFK to the value 'new record no portal'.Of course, this is not the method experienced FMP developers would use to create a related record. Most experienced users would use a method similar to that described by Giuseppe Pupita.Regards,Jason L. DeLoozeAnnapolis, MD USA410-626-7415AIM: Jason L DeLooze-This list is a free service of OmniPilot Software, Inc.Search the list archives:Manage your subscription.
In FM8 you can use variables; you'have a script like Set Variable ($ID, tableone::onePK) Go to Layout ( a layout of table two) New record Set field (tabletwo::twoFK; $ID) Go back to original layout A comment In general table one should not have any foreign key, since - by definition - it is a master table; in table two the value of twoPK should be unique, a serial number or the like, and should not derive anyhow from table one-This list is a free service of OmniPilot Software, Inc.Search the list archives:Manage your subscription. So how would the experienced user modify the script so it navigates to newlycreated record at the bottom of the portal? Let's assume that there aremultiple portals on the same layout.I would like to see the last record created if there is a long list of itemsin the portal row but I do not want the script to insert the flashing textentry cursor into any of the visible fields. I tried to insert a 'go to lastportal row' step at the end of the script but it is going past the last rowand it is also insert the flashing text cursor into the field.Should the script track the count of portal rows and go to the last recordby the calculation results, or is there a faster and more direct way to dothis?on 6/3/06 9:17 AM, Jason L. DeLooze wrote: Of course, this is not the method experienced FMP developers would use to create a related record. Most experienced users would use a method similar to that described by Giuseppe Pupita.-This list is a free service of OmniPilot Software, Inc.Search the list archives:Manage your subscription.
So how would the experienced user modify the script so it navigates to newly created record at the bottom of the portal? Let's assume that there are multiple portals on the same layout.
I would like to see the last record created if there is a long list of items in the portal row but I do not want the script to insert the flashing text entry cursor into any of the visible fields. I tried to insert a 'go to last portal row' step at the end of the script but it is going past the last row and it is also insert the flashing text cursor into the field. Should the script track the count of portal rows and go to the last record by the calculation results, or is there a faster and more direct way to do this?Turn off 'Allow creation of records in this table via thisrelationship.' Then your Go To Portal Row (Last) will go to the newlycreated one (assuming that whatever sort is in use puts it there).In order to guarantee that it goes to the right portal, you can go toa field in the TO that the the portal is using first.-Jonathan Fletcher-This list is a free service of OmniPilot Software, Inc.Search the list archives:Manage your subscription. Hi Steve,I looked at your v1b example. My responses are mixed within your post.On 6/3/06 at 14:19 -0500, Steve Penn wrote: So how would the experienced user modify the script so it navigates to newly created record at the bottom of the portal?
Let's assume that there are multiple portals on the same layout.First one needs to set the portal focus, especially if there are multiple portals on the layout. We set the portal focus by going to a field in the portal. Thus,Go to Field TABLETWO::twoFKOnce we have the portal focus, we then go to the portal row we want to select. Thus,Go to Portal Row Select; LastWe use the 'Select' option to highlight the entire portal row.and. deselect the portal row field we had previously used when we set the portal focus; that is, when we used 'Go to Field TABLETWO::twpFK'. I would like to see the last record created if there is a long list of items in the portal row but I do not want the script to insert the flashing text entry cursor into any of the visible fields.
I tried to insert a 'go to last portal row' step at the end of the script but it is going past the last row and it is also insert the flashing text cursor into the field.For the portal in your sample file (v1b), the relationship on which the portal is based is set to 'Allow creation of records.' , which causes the portal to have an empty bottom (last) row for the creation of new records. However, we do not need to allow related record creation via the portal so we can get rid of this empty bottom row if we disable the 'Allow creation of records.'
On the other hand, if you still want to be able to create related records via the portal (in other words, you want that empty row), then we need to remember that extra row is present in the portal and move back one portal row. Thus,Go to Portal Row Select; Previous Should the script track the count of portal rows and go to the last record by the calculation results, or is there a faster and more direct way to do this?I explained what was happening above; why you were going the the 'empty last row' instead of the new related record in the 'next to the last row'. Either disable 'Allow creation of record.' On 6/3/06 at 6:55 -0700, Bruce Robertson wrote: I am not sure what is the best way to do this because I am pretty new to FM8 but here is one way that works for me: Create a 'global' field and set the desired relationship value with a script. (This is how you are going to pass the related value to the other table witout using a portal.) Next, have the script create a new record in the target table and define your related field to do a lookup from the global field that you just set at the beginning of the script.
Here is a working sample that you can download: No, that file is not an example of the technique you just described. The table twoPK you defined is an auto-enter calc that can't work - and it doesn't work, you are overwriting it with your script. Bruce, The file does work as he described. What may be confusing you is his use of PK and FK terminology; when I first looked at his example, I also was puzzled by the setting of TABLETWO::twoFK to the value 'new record no portal'. Of course, this is not the method experienced FMP developers would use to create a related record.
Most experienced users would use a method similar to that described by Giuseppe Pupita.No, it doesn't. It uses an auto-enter field but then just overwrites thefield. So the auto-enter is not used for anything.-This list is a free service of OmniPilot Software, Inc.Search the list archives:Manage your subscription.
Well, you could have a second relationship to the same related records sorted by the modification dates of the related records, most recent first. Then the record that had had the document dragged into the container field would appear as the first related record via that relationship, and you could grab an ID field from it.Alternatively, each related record in the portal could contain an unstored calculation field set to 'get(recordnumber)'. Within a portal, that will evaluate to the portal row number of the record.
Maybe you could use that somehow. Without more information on what you're trying to accomplish, though, it's tough to say.