2 Replies Latest reply on May 18, 2016 11:12 PM by andrewfig

    Best Practice Using Merge Fields

    andrewfig

      I just jumped into the world of Filemaker so I apologize in advance if its been asked.

       

      I have a tabbed section.

      Tab A has text fields for customer name, number, billing address. All of which are inputted manually on the database, not imported through excel.

      Tab B has has text fields for customer name, shipping address.

       

      Right now, I'm using Merge Fields for Tab B:Customer-Name from the data thats entered into Tab A::Customer-Name. Is that the best approach to eliminating having to type in the name twice but still displaying the name (once on each tab)?

       

      Side note: Since Tab A:Billing Address is sometimes different than Tab B:Shipping Address, is there a way to populate the Shipping Address from Tab A's: Billing Address but still have an opportunity to edit it? With Merge Field, I know you cant without editing the original value (in this case, without editing the value from Tab A:Billing Address)

       

      Thanks!

        • 1. Re: Best Practice Using Merge Fields
          erolst

          There's nothing stopping you from adding the same field a second time to a layout (or any number of times, for that matter).

           

          andrewfig wrote:

          Is that the best approach to eliminating having to type in the name twice but still displaying the name (once on each tab)?

           

          The question is: where would you type that name a second time? You already entered it where it belongs, so if you show the same field a second time, it will (of course, one might say …) show the same contents, because it is the same (identical) field.

           

          Another thing to note: this transaction pertains to a customer; so the usual way is to have a Customer table and reference an existing Customer record as being the customer of a given transaction (and display a related name field). If you want to change the customer's name, you'd do it where it is stored: in that referenced Customer record.

           

          (It's different for addresses, because you want to take a snapshot in time: so that is an information you would copy, not just reference.)

           

          You may want to read the introductory sections of the Help system about relationships. While what you're doing will work (to a degree), it doesn't really tap the power of FM as a relational database.

           

          andrewfig wrote:

          Side note: Since Tab A:Billing Address is sometimes different than Tab B:Shipping Address, is there a way to populate the Shipping Address from Tab A's: Billing Address but still have an opportunity to edit it?

          Use an auto-enter calculation that references the billingAddress field (i.e. the result calculation is simply the field name); make sure to uncheck the “Do not replace …” option. This way, a change to billingAddress would be transferred to shippingAddress, but not vice versa.

           

          As noted above, usually you would store both address types in a Customer table, and then use an auto-enter calculation in the Transaction table to capture (copy over) those data in your transaction record.

          • 2. Re: Best Practice Using Merge Fields
            andrewfig

            Thanks so much! You're a rockstar