Newbies weezy Posted August 26, 2007 Newbies Posted August 26, 2007 Might as well put it up front, I'm a rank amateur. Sorry if this question has already been asked. I've created a portal that displays related records from a table. Although I have changed the relationship to allow 'creation of related records' it still isn't letting me create them. A row is generated, but I can't enter data in it. I want to be able to enter the first field in the portal record, put in a piece of data (one letter), and have it insert data from the related table across the portal record. Can anyone point me in the right direction? I don't want to mess around with creating buttons and global keys etc. I'd rather fix it in the relationships/tables if at all possible. Any help is much appreciated, Louise
IdealData Posted August 26, 2007 Posted August 26, 2007 Are the fields in the portal from the relationship that the portal is supporting? Make sure also the the fields are inside the first portal row in layout mode.
CobaltSky Posted August 26, 2007 Posted August 26, 2007 Hi Louise, It's a little difficult to tell from your post what exactly you have in mind. You say: I want to be able to enter the first field in the portal record, put in a piece of data (one letter), and have it insert data from the related table across the portal record. ...which seems to indicate there are at least three tables involved. Ie the portal shows records from a table related to the current one (that's what portals do, after all), but you're talking about inserting data from "the related table" (which must presumably be a third table, since data from it is being inserted into the portal table)? Structures of that kind are certainly possible. But exactly how they should be set up depends on the logic of the data and the tables involved. However I am attaching an example of one such set-up. Hopefully it will at least give you some ideas to work with. :wink2: AutoPortal.zip
Newbies weezy Posted August 27, 2007 Author Newbies Posted August 27, 2007 There are only two tables involved. Table1 contains two fields called city and state. These values are combined via a calculation in a field called city_state. The city_state in table 1 has a lookup based on one of table2's fields, city_state. The layout for table1 contains a portal to table2, which displays any records that match the city_state field in table1. I want to create a new record, in the portal/table2, that inserts the city, state, and city_state fields from table1 and creates a new record in table2 based on that information. When I try to enter something in the new record I get an error saying, "this field is not modifiable.' I can get it to work if I change the relationship between table1 and table2 to ref. the city fields in each table. The problem with doing this is the table2 portal won't show any existing related records. I have a feeling that the lookup or possibly the calculation fields are screwing it up somehow. ??
CobaltSky Posted August 27, 2007 Posted August 27, 2007 There are only two tables involved. Table1 contains two fields called city and state. These values are combined via a calculation in a field called city_state. The city_state in table 1 has a lookup based on one of table2's fields, city_state. The layout for table1 contains a portal to table2, which displays any records that match the city_state field in table1. I want to create a new record, in the portal/table2, that inserts the city, state, and city_state fields from table1 and creates a new record in table2 based on that information. When I try to enter something in the new record I get an error saying, "this field is not modifiable.' I can get it to work if I change the relationship between table1 and table2 to ref. the city fields in each table. The problem with doing this is the table2 portal won't show any existing related records. I have a feeling that the lookup or possibly the calculation fields are screwing it up somehow. ?? Hi weezy, There are a couple of things about your explanation that don't seem to make a lot of sense. You say "table 1 has a lookup based on one of table2's fields, city_state" but then you say that it is the fields in table2 that you are expecting to fill in automatically, so preumably table2 has a lookup that refers to table1, not the other way around?! Then later you say "...possibly the calculation fields are screwing it up somehow". You're using the plural for calculation fields here, but you have only mentioned *one* calculation field (city_state in Table1). Also, in your initial post, you said you want to enter just one letter in the portal and have it fill out the whole row, but I see nothing in your second post to indicate how you were expecting this to work (how do you expect FileMaker to know from a single letter, which record in table1 you want it to copy data from)? Notwithstanding that, one of the issues would appear to be indexing. If you are creating the portal record (with a lookup to table1) before the record in table1 has been committed, table2 will not be able to "see" the record in table1. That's because indexes are not built until the record is committed (exited) and relationships use the index to establish the connection between related records. However the indexing issue would not account for the error message you say you are seeing. Such a message would generally occur if either of the key fields were not indexable or not writable (or both) For instance, if the source key calculation (table1::city_state) is an unstored calc, or if the key field in the table on which the portal is based (table2::city_state) is a conventional calc and therefore not writable. Beyond the above comments, it's difficult to help you due to confusion in your description about what you are actually doing. If you are able to clarify your explanation it may be a little easier to provide advice. :wink2:
Recommended Posts
This topic is 6298 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