3 Replies Latest reply on Jul 29, 2009 12:30 PM by mrvodka

    Set field issue when using table mode

    bearhart74_1

      Summary

      Set field issue when using table mode

      Description of the issue

      Scenario...table a has text field 1, text field 2, text field 3layout 1 is based on table alayout 1 has edit boxes for field 1 & field 2 in layout mode.set layout 1 view type to table only (list and form not checked)go to browse modemodify table to add field 3 to view run the following script ... go to layout 1show all recordsgo to first recordloopif field 1 = whateverset field 2 = "text a"set field 3 = "text b"end ifgo to next record exit at lastend loopexit script field 3, even though it is visible in browse mode on layout 1, does not consistently set to "text b".   

        • 1. Re: Set field issue when using table mode
          TSGal

          bearhart74:

           

          Thank you for your post.

           

          Unfortunately, I am unable to duplicate the problem.  This is what I have done using FileMaker Pro 10 on Mac OS X 10.5.7:

           

          1. I created a new table, "a", with the following fields:

           

          field1 (Text)

          field2 (Text)

          field3 (Text)

           

          2. I removed field3 from the layout.

           

          3. In Browse Mode, I pulled down the View menu and selected "View as Table".  Only field1 and field2 display.

           

          4. I clicked the "Modify" button and added field3, and all three columns now display.

           

          5. I added 100+ records, where 60+ records contained "whatever" in field1.

           

          6. I created a script, "table a test", with the following script steps:

           

          Go to Layout [ "a" ]

          Show All Records

          Go to Record/Request/Page [ First ]

          Loop

             If [ a::field1 = "whatever" ]

                Set Field [ a::field2 ; "text a" ]

                Set Field [ a::field3 ; "text b" ]

             End If

             Go to Record/Request/Page [ Next ; Exit after last ]

          End Loop

           

          When I execute the loop, there is an entry "text b" in field3 for every occurrence of field1 = "whatever". 

           

          If you want me to add more records, or try with another version or platform, let me know.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Set field issue when using table mode
            bearhart74_1
              

            Its kind of interesting that FM does not throw an error when you make mistakes like...

             

            set field(table1::field 1;table1::field1 = "textb") it just puts in garbage...

            • 3. Re: Set field issue when using table mode
              mrvodka
                

              Why would it throw an error?

               

              You are telling it to Set a Field, table1::field 1

               

              to in this case a boolean test of: table1::field1 = "textb"

               

               

              Its hardly garbage or a bug on FileMaker's part. It would be set to a value of 1 or 0. ( True or False )