1 Reply Latest reply on Dec 13, 2010 10:30 AM by philmodjunk

    Portal Problem when creating new records to a related table



      Portal Problem when creating new records to a related table


      I have 2 tables that are related. I have a layout (from table1) that uses a portal to create new records in the other table (table2). It works except for when I go to enter a new record using the portal I get an error message that reads "The field cannot be modified until "name_of_field" is given a valid value." Each time I try to enter data into each of the fields in the portal, I get the same error message but with a different field name in the error message. If I go through and attempt to enter data into each field in the portal (dismissing the error message each time), after I've attempted entering data in each field, all the data I attempted to enter finally shows up in the portal row. At this point the new record added via the portal appear in the other table1 as expected. 

      Why am I getting those error messages, and how do I get rid of them so I can enter data into the portal normally?

      How do I set it up so each row in the portal can create a new record in table2? Right now, trying to add data to any additional rows in the portal  causes the fields in that row to fill themselves automatically with the data that was entered in the first row of fields.

        • 1. Re: Portal Problem when creating new records to a related table

          It would help to see the relationship linking table 1 to the portal to table 2.

          Something is not set up quite right with either the relationship, or the details of your portal set up or both.

          The error message is most likely indicating that a field in table 1 that is defined as a match field for this relationship does not have a valid value, most likely, this field is empty at this time.

          If you have this type of relationship for your portal:

          Table1::primarykey = Table2::Foreignkey

          where primarykey is an auto-entered serial number.

          You can double click the line linking these two Table Occurrences and select the "allow creation of records via this relationship" for Table 2. Then, simply entering data in the bottom blank row of the portal will create a new related record in Table 2, auto-entering the current value of primarykey into the Foreignkey field of this new record in table 2.