7 Replies Latest reply on Oct 3, 2014 12:03 PM by pruppert

    Conditional Display of Fields on Form: Is It Possible?

    pruppert

      Title

      Conditional Display of Fields on Form: Is It Possible?

      Post

      I would like to create a form that only displays fields and labels if the data for those fields exists. If there is no data for that field, I would not want an empty field box to show. Also, I would want the fields with data to flow after the other on the form without blank space in between them where the fields with no data were and/or are hidden.

      Basically, I'd like to have a form that dynamically adjusts the display of data depending on what data is available for any given case.

      Is this possible?

        • 1. Re: Conditional Display of Fields on Form: Is It Possible?
          philmodjunk

          It is possible.

          Are you using FileMaker 13 or an older version?

          The best way to do this is different depending on whether you are using that version or something older.

          • 2. Re: Conditional Display of Fields on Form: Is It Possible?
            pruppert

            I am on version 12 now, so curious to hear if possible in 12. However, if it is easier to do this in version 13, I'd be curious to hear how it is improved.

            • 3. Re: Conditional Display of Fields on Form: Is It Possible?
              philmodjunk

              It is much simpler to do in FileMaker 13, but can be done in nearly any version of FileMaker.

              With FileMaker 12 and older:

              Define a calculation field with a text result type to use as the label text for each data field where you need this capability: Example:

              IF you have a date field named DueDate that you label as "Date Due" on your report layout, define this calculation:

              IF ( Not IsEMpty ( DueDate ) ; "Date Due" )

              Replace the layout text used as field labels with the new calculation fields. Then, set the calculation fields and the data fields to "Slide Up" and also set them to "resize enclosing part".

              Note that this change will only be visible in Preview Mode or when you print or save as PDF. It does not affect what you see in Browse Mode.

              In FileMaker 13, you do not need to add calculation fields. You can use the new "Hide Object When" setting to hide the label text when the field is empty, then set up the "slide" and "Resize" options on both label text and data field as you would in older versions.

              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.
                      

              Caulkins Consulting, Home of Adventures In FileMaking

              • 4. Re: Conditional Display of Fields on Form: Is It Possible?
                pruppert

                Thank you so much. That is exactly what I was looking to do.

                • 5. Re: Conditional Display of Fields on Form: Is It Possible?
                  pruppert

                  One more question related to this. I know that it is possible print a form with multiple columns. Do you or anyone know if it possible to have fields slide up into preceding columns from subsequent columns if there is room?

                  • 6. Re: Conditional Display of Fields on Form: Is It Possible?
                    philmodjunk

                    I don't see a way to do that if you are using the printing tab to specify the column format to your layout--which arranges your records, not your fields into columns. (Sometimes it's better to have multiple records in place of multiple fields, BTW.)

                    But if your have columns of data within the same record, there's also an option to slide data to the left, but I'm not sure that can get that to work and still get your data into columns like you want.

                    You may be looking at a situation where you need to use a calculation field to combine your data with tab characters inside a single field and then use the Inspector's appearance tab to set tab stops to align your data into columns.

                    • 7. Re: Conditional Display of Fields on Form: Is It Possible?
                      pruppert

                      Ok. Thanks, again. I don't have the time today to try this out, but I'll investigate later if that would work for me.