2 Replies Latest reply on May 11, 2010 11:29 AM by brucewashington

    replacing field content in a portal

    brucewashington

      Title

      replacing field content in a portal

      Post

      Hello all,

      I am trying to replace the field contents in a portal row - the date field and am wondering if there is a way to replace a couple hundred fields at once.

      It seems like it would be almost impossible.

      Thanks for any ideas.

      Bruce

        • 1. Re: replacing field content in a portal
          philmodjunk

          Is this on a file shared over a network or a single user file?

           

          If it's a single user file, you can use Replace Field Contents to do this.

           

          You either use Go To Related Records or a scripted find to pull up the portal records in a layout based on the Portal's table and then use replace field contents to update the set of records.

          With a scripted find, you capture the necessary values in variables before switching layouts and perfoming the find. WIth GTRR, you may need to test to make sure there are related records so that you don't do a Replace Field Contents on the wrong set of records.

           

          Since Replace Field Contents will modify all the records in your found set, test this out on a copy of your file until you are sure you have it working correctly. Also, if there is any chance that another user might be editing one of the records you are trying to update, don't use this method. Such records are "locked" by the other user and replace field contents will skip over those records. You'll get an error message warning you that this occurred, but the message won't tell you which record(s) were not updated.

           

          Thus, in a multi-user environment, you might want to loop through the records one at a time to update them as you can then test for locked records and either halt on the locked record or make a list of the locked records so that you know which records were not updated.

           

          If you decide to use GTRR, make sure you read the warnings in the help file if you have Filemaker 11. If you have an older version, read this thread:

           

          Go To Related Records is a very useful tool, but can be hazardous if you don't properly trap for errors. To learn more about GTRR, click the following link:

          The Complete Go To Related Record