3 Replies Latest reply on Sep 24, 2015 2:24 AM by Benjamin Fehr

    FieldNames function and the Field Picker - v14.0.2

    sean.moore

      Fields added to a table view using the Field Picker are not added to the layout and do not appear using the FieldNames function unless the user is actively on the layout referenced, and in the Table View. This leads to confusing and inconsistent results.

       

      Attaching an example file.

        • 1. Re: FieldNames function and the Field Picker - v14.0.2
          Benjamin Fehr

          I've checked your file. Everything behaves as expected.

          With FileMaker development, are you aware that you have to assign fields to layouts for every layout individually?!

          • 2. Re: FieldNames function and the Field Picker - v14.0.2
            sean.moore

            Yes. My confusion came because I thought adding fields with the Field Picker constituted them being on the layout. But the FieldNames function only considers them to be on the layout if you are actively on the layout and in table view mode. The other methods of adding fields allows you to get these values from any layout. For instance in my file if you are on the layout, "TestLayout", FieldNames ( Get ( FileName ); "FieldNamesTest" ) returns "Field1 ¶ Field2". The same function when you are viewing "FieldNamesTest" in Table view returns "Field1 ¶ Field2 ¶ Field 3 ¶ FieldNames". It is this inconsistency that is problematic, in my opinion.

             

            Edit: In this case Field1 and Field 2 were added by placing fields on the layout. Field 3 and FieldNames were added using the field picker.

            • 3. Re: FieldNames function and the Field Picker - v14.0.2
              Benjamin Fehr

              I'm still not sure if I got this right:

              You're supposed to drag-and-drop the fields you need in a layout from Field-Picker over onto the Layout.

              On top of the Field-Picker, you can change from which related table you want to pick fields.