5 Replies Latest reply on Feb 10, 2011 10:30 AM by philmodjunk

    Creating a layout that contains Form Elements and a List View simultaneously...

    ThomasKitts

      Title

      Creating a layout that contains Form Elements and a List View simultaneously...

      Post

      Definitely a newbie question here...

      Question: Is it possible to created a FMP layout that can emulate fields being added to a list layout?

      On the left of a FM screen layout, I'd like to have a column that contains check boxes, and when checked, cause fields to appear in the area to the right, an area which would represent an actual report print out. Then, I'd like a second column to contain additional check box items which can be used to filter the report. (Essentially, say, a control panel that can add inventory information to the report and then filter or subtotal the contents by client or vendor.) And once the user has created the layout they want, and see it visually confirmed, be able to print that report out.

      I've seen this accomplished using two FMP windows in a run-time application, presumably using both a Form and List view which are somehow connected. But my question is, can this be done within a single window? I find using two windows to perform this task to be somewhat confusing to the user.

      If this can't be done I sure like to know. Don't want to waste time trying to figure it out.

      TIA

      thokitts

        • 1. Re: Creating a layout that contains Form Elements and a List View simultaneously...
          philmodjunk

          A given layout can only be viewed as List, Table or Form--there's no way to combine them. There are ways, however, to set up portals to a related table--which is likely what you saw in the run time. Such portals typically look like a miniature table listing multiple values and often have a scroll bar so that the user can see and edit values even when there are too many to display at the same time.

          What you describe isn't impossible, but there are limits to what is truly practical and the final version could be fairly complex.

          What you describe could likely be done with a pair of global fields formatted with check box groups. One field could list your data criteria--that's often done and fairly easy to work with. The other could control what fields are included in your report--that one could be trouble for you.

          Controlling what fields are included in your report could require you to create many different layouts in advance whith a script that uses the fields selected in this global field to determine which layout to use for your report. You may be able to reduce the number of layouts by using visibility tricks to hide fields (and their labels) that have been omitted from your report, but dynamically repositioning the fields may prove difficult. (Might be possible to set fields to "slide left" if you can get field label text to slide to match--which might not be possible with some layouts.)

          • 2. Re: Creating a layout that contains Form Elements and a List View simultaneously...
            ThomasKitts

            "A given layout can only be viewed as List, Table or Form--there's no way to combine them. There are ways, however, to set up portals to a related table--which is likely what you saw in the run time. Such portals typically look like a miniature table listing multiple values and often have a scroll bar so that the user can see and edit values even when there are too many to display at the same time."

            Well Phil,  this explains why the solution I am trying to model uses two windows then. One window as a control panel for checkboxes and the other as the target that you can print. When you select a checkbox in the control panel (i.e., Window A) the corresponding field appears in a column in Window B. This is true for the filtering aspect as well. And if you check some, but not all check box items, there is no gap between various fields, so I am assuming that Window B must be in some sort of permanent print preview state. Otherwise the slide function would not be working. Is this right?

            How does one hide or show a field in a remote window? Is it a complex script to write?

            TIA,

            Thokitts

            • 3. Re: Creating a layout that contains Form Elements and a List View simultaneously...
              philmodjunk

              In the lower left corner of a FileMaker window you can check the window mode. If the window of the report says "preview" then yes, you are viewing the window in preview mode. If it says Browse, you are not.

              I can think of two ways to make this happen. One option is to set field or global variable values to make the displayed field content empty, then preview the window with fields set to "slide left". That doesn't work easily for every possible report layout, but isn't strictly impossible. The other option is to create multiple layouts and the script simply switches layouts.

              The results from the user's perspective would be identical.

              PS. your initial description sent me on a search of possible script steps. It sounds like the script mirrors the effect you can get manually by clicking the modify button for a table view layout and then clicking check boxes to hide/reveal columns displayed in the table. I wondered if a script step existed that allowed a script to modify a table view in the same way, but I could find no such script step. However, using the modify button in this fashion is so similar to what you describe, that I am wondering if this built in feature of FileMaker is what you might actually be using with this other file.

              • 4. Re: Creating a layout that contains Form Elements and a List View simultaneously...
                ThomasKitts

                "I can think of two ways to make this happen. One option is to set field or global variable values to make the displayed field content empty, then preview the window with fields set to "slide left". That doesn't work easily for every possible report layout, but isn't strictly impossible. The other option is to create multiple layouts and the script simply switches layouts."

                Correct. The runtimeFMP  program I am trying to understand uses two windows -- a 'control panel' window which allows you to check boxes and filter the results, and the 'Preview" widow which apparently displays the results. And yes, the preview window has the word 'preview' visible in the lower left corner, and since it is a runtime program I am not allowed to select any other layout. The control panel is in browse mode.

                How does one use a script to display FMP to display a window in preview mode, and have it constantly refresh whenever a check box changes in a second window? Here is the app, if you want to look at it.

                http://www.arawak.com.au/flick.html

                You'll find this double window trick in the "Report" tab, then, "Produce Inventory Report" button. I just don't get how it works...

                TIA,

                thokitts

                • 5. Re: Creating a layout that contains Form Elements and a List View simultaneously...
                  philmodjunk

                  Simplest is just this:

                  Select window [//select preview window]
                  Go To Layout [//change to different layout]
                  with maybe: Select window [//select original window to keep it floating in front] // haven't tried this so would have to experiment to find out

                  With sliding left fields, you'd need to define calculation fields such as:

                  If ( IsEmpty ( FilterValues ( CheckBoxField ; "Field1" ) ) ; "" ; Field1 )

                  This is the field that would be placed on the report layout so that clearing its check box makes the field empty so that the fields to the right can slide left. It's tricky to set up and you may have to define many, many such calculation fields for both data fields and their labels in order for the sliding to work correctly.