7 Replies Latest reply on Aug 19, 2015 12:16 PM by philmodjunk

    Merge Fields

    MT_2

      Title

      Merge Fields

      Post

      Hi,

       

      I am trying to create a layout to act like a letter. On the layout I want to add info using merge field option with as such a Header i.e

      Net Monthly Salary: <<Net Monthly Salary>>

      I want to know can I somehow make the first part Net Monthly Salary: be hidden/disappear if the actual merged field is empty?!?

      Any help appreciated.

        • 1. Re: Merge Fields
          philmodjunk

          Possibly. If you are using FileMaker 14 or later and "Net Monthly Salary: <<Net Monthly Salary>>" is a separate layout object, you can use Hide Object When to hide this object when the field is empty.

          If you need to make this part of a larger text block and only this part should be visible, you can define a calculation field that returns the field label only when the Net Monthly Salary field is not empty and insert it as another merge field in place of the layout text.

          • 2. Re: Merge Fields
            MT_2

            Hi,

            I am working in FM13

            I am trying to do a layout that has the following merged fields on it and I want to try and make the merged field and its header disappear and move up the page if the actual field is empty.

            Name: <<First>> <<Last>>

            DOB: <<Date Of Birth>>

            Age: <<Age>>

            Relationship Status: <<Assets::Relationship Status 1>>

            Occupation: <<Assets::Occupation>>

            Annual Salary: £<<Assets::Annual Salary 1>>

            Net Monthly Income: <<Assets::Net Monthly Salary 1>>

            Net Monthly Other Income:<<Assets::Net Monthly Other Income>>

             

             

            • 3. Re: Merge Fields
              philmodjunk

              Sorry, I meant "FM 13 and later as FM 13 introduced "Hide Object When".

              What I described with calculation fields used to label each field shown in your example will work.

              Making each line a separate text object with Hide Object When could also be used if: a) you set all your items to "slide up" in the inspector and you only needed to see this happen when in Preview Mode or when printing/saving as PDF.

              A third alternative is to define a single calculation field and put all of this into one large calculation and then you would just put that single field on your layout.

              • 4. Re: Merge Fields
                MT_2

                Hi Phil,

                Thank you, I have tried the 3rd option and can get them to hide based of the field being empty but if I make each line a separate and insert the field and then select hide plus slide up options, it hides but does not move up.

                • 5. Re: Merge Fields
                  MT_2

                  sorry I meant used your 2nd option

                  • 6. Re: Merge Fields
                    MT_2

                    Phil.

                    Apologies, I kept it in browse mode and did switch to preview.

                    I think this works, let me do some more and I will let you know.

                    Many Thanks

                    • 7. Re: Merge Fields
                      philmodjunk

                      Key facts about sliding layout objects:

                             
                      1. It's only visible in preview mode and when you print/save as PDF...
                      2.      
                      3. Sliding fields will shrink but not expand.
                      4.      
                      5. All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
                      6.      
                      7. Objects in headers and footers will not slide.
                      8.      
                      9. Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
                      10.      
                      11. Fields will slide up only if Top alignment is specified for it and will slide left only if Left alignment is specified.
                      12.      
                      13. Consistent side borders are difficult to achieve with sliding fields.
                      14.      
                      15. In FMP13, hidden objects (”Hide object when”) will slide/resize.