7 Replies Latest reply on Oct 11, 2013 10:29 AM by philmodjunk

    Layout issue...how to resolve?

    SamRembert

      Title

      Layout issue...how to resolve?

      Post

           I've been using the same layout for years, I think since Filemaker 7.  It's a multi-step list of how various lighting fixtures plug into circuits and how those are mapped to control channels. 

           I really want the outcome to be in this format:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                          A                     1                     3 PAR
                                                3                     1 Leko
                                                                      2 PARs
                                                8                     1 Worklight
                          B                     4                     4 PARs
                                                5                     2 Lekos
                          C                     10                     1 Leko
                                                                      1 PAR
                                                                      1 Practical
                                                12                     1 Worklight

           So, A controls 1, 3, and 8.  1 and 8 each have one line's worth of stuff plugged in, while 3 has two lines.  The kicker comes that prior to Filemaker 12,  I could make the stuff line up as above, so that the first line of A appeared to be lined up with A, and subsequent lines fell below.  As of Filemaker 12, I cannot figure out how to do this.  The graphic at the end might show it better.

           In order to accomplish this before, the first sub-summary and the second sub-summary were each 1-pixel high parts, with the text falling into the next space.  Using text-box sizing techniques, I could make everything line up.  Filemaker 12 cuts off anything that spills over the end of a sub-summary field, making this impossible.  I've tried sliding options and all sorts of things.  Nothing seems to be able to re-create that look.  

           The downside of the method above was that oftentimes, things would get cut off and lost at page breaks.  Either way, I'd like to somehow get that look back, and not have to resort to the look of the last part of my image below.

           Does this make any sense?

      filemaker.jpg

        • 1. Re: Layout issue...how to resolve?
          JonJ

               Hi,

               If I understand you, you want the first row of a new category to display category title. 

               Why not make an unstored calculated field that displays the category title only if the previous record is different category value.

               Then you could include it in the body part with the fields it's supposed to align with. This will be more robust in the long term than relying on a quirks of the way way layouts are rendered (which is apt to change without warning!) 

               The calculation would be something like:

                

               Let([
                
               // get current record's category, and the record number (i.e. within the found set)
               §myCategory = CategoryField ;
               §myRecordNumber = Get(RecordNumber) ;
                
               // get category of preceeding record in the current found set 
               §previousCategory = GetNthRecord ( CategoryField ; §myRecordNumber - 1 ) ;
                
               // what to display
               result = 
               Case(
               // first record in found set always displays category...
               §myRecordNumber = 1 ; §myCategory ;
                
               // if this record's category is different from the preceeding record, display the category...
               not Exact(  §myCategory  ; §previousCategory ) ; §myCategory ;
                
               // …otherwise don't show
               ""
               )
                
               ];
                
               result
                
               )
                
               Hope this helps,
                
               J.
                
          • 2. Re: Layout issue...how to resolve?
            philmodjunk

                 I'm surprised that worked in FileMaker 11. I seem to recall discovering that this long used trick also failed with the release of 11....

                 In addition to a calculation field, you can put the same logic inside a conditonal format expression and just make the field invisible when the preceding record has the same value in the field.

                 Get ( RecordNumber ) = 1 or GetNthRecord ( YourTable::Category ; Get ( RecordNumber ) - 1 )  ≠ self

            • 3. Re: Layout issue...how to resolve?
              JonJ

                   Yes, that would be a way of dealing with it without creating a new field.

                   It's important to stress that both solutions rely on 'mainstream' filemaker behaviours, and so are much less likely to break in future versions of FM.

              • 4. Re: Layout issue...how to resolve?
                SamRembert

                      

                     

                In addition to a calculation field, you can put the same logic inside a conditonal format expression and just make the field invisible when the preceding record has the same value in the field.

                     

                Get ( RecordNumber ) = 1 or GetNthRecord ( YourTable::Category ; Get ( RecordNumber ) - 1 )  ≠ self

                     Wow.  That was easy.  I do a lot of Filemaker formatting and scripting, but for some reason, I just never put that together!!  That works perfectly as far as the text goes, and is a lot more flexible.  Thanks!!

                     Now, part 2...there's no way, using this method, to get lines to work as in the Filemaker 11 example, is there?

                     EDIT : I found that I can do the lines using sub-summaries before the main body line.  It kind of works.  Now I just need to see if I can get it to not make four separate lines if I have 4 sub-summaries at a break.  It would be great if you could apply conditional formatting to an object in a body line.

                • 5. Re: Layout issue...how to resolve?
                  philmodjunk

                       What do you mean by "lines"?

                  • 6. Re: Layout issue...how to resolve?
                    SamRembert

                         I mean the dividing lines between sets of data.  For instance, if you look at the Filemaker 11 example, before each change in channel (1, 2, 3, 4), there is a heavy line.  Between each new dimmer is a lighter dividing line whose left end lines up with the dimmer column.  This series of lines makes it much easier to differentiate everything visually.

                         See the attached shot.  In the left one, there are no lines.  On the right, there are dividing lines for each sub-summary, helping divide up the data.  One issue, though, is that the series of lines can't overlap using this method, so some of it looks rather jumbled.  But, definitely getting there!  I think if you could add conditional formatting of some sort to objects like this, that would open a whole new world!

                         Both of these were done in FMP12, by the way...so I do have the body conditional formatting working! smiley

                    • 7. Re: Layout issue...how to resolve?
                      philmodjunk

                           It looks like you have a line in a "print above" sub summary part instead of in a "print below" sub summary part.