Dimitrios

Get(VisibleSummaryParts)

2 posts in this topic

Hello,

I am not sure if this is a tip, or if it is already known.

Anyway it has a practical value for me so I thought I post it.

Sometimes I need to present data in a layout with several sub-summary parts and usually no body parts

I find it good interface, to give the user the ability to click on the only visible sub-summary part and reveal the next part in the hierarchy, and so on...

Thus expanding and collapsing the list by clicking on the headers.

From what I read in the forums the standard technique for this is to have a global variable to store whether part X is expanded or not.

I don't like that method very much so I thought of an alternative.

Layout  Example Structure

Sub-Summary Part1   (based on COUNTRIES::Name)

Sub-Summary Part2   (based on COUNTRIES::CityID)

Sub-Summary Part3   (based on CITIES::SalesmanID)

To the right of the sub-summary part, just off screen we put an instance of the field we are sub-summarizing by. 

For example, inline with sub-summary Part1 we put an instance of the field COUNTRIES::Name and we name the Object as "Part1"

 

Now if the sub-summary part is visible using the following :

GetLayoutObjectAttribute ( "Part1";"source" ) will give us "COUNTRIES::NAME"

or if the sub-summary part is not visible will give us error 102 (Field is missing)

 

By looping with a $counter variable through all sub-summary parts (1....n) 

we can get a list of the visible sub-summary parts (the fields they are based on)

Then we can use this information to sort the records anyway we want to.

 

That's it!

I think it would be nice if someone thought a way to have the list sorted in the way the parts are presented.

Thanks, Dimitrios

Share this post


Link to post
Share on other sites

Good one!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • By 123
      Hey,
      I want to use the same header on all my layouts in FileMaker Pro 15 Advanced but I can't seem to find a way to accomplish it. I read on Google and other forums that there is no way to do it, however the posts I found are all at least a year or two old. Did they add a way to do it in FileMaker 15 or do I still need to duplicate a layout to get the same header on a different one?
      Thanks in advance,
      Mike
    • By Guy_Smith
      I've read through the previous posts on things not sliding left properly and I've tried all of the known fixes, and I'm still stumped.  Here's my problem:  I'm trying to get a mailing label layout to display a comma and then any suffix that may follow a person's name (such as Ph.D, PE, MSCE, etc.), but if there is no suffix, then I do not want the comma to display.  Should be a piece of cake, right?!  Ummm...Nope!
      I have fields for prefix (Dr., Ms., Mr., etc.), first name, last name, and suffix.
      I first added a calculation field to combine the prefix, first name, and last name:  = Prefix & " " & First_Name & " " & Last_Name and a second calculation field to combine a comma and the suffix:  = ", " & Suffix.  The comma and suffix field is conditionally formatted to be white if there is no suffix.
      When viewed in Browse Mode, it's looks wonky, but, OK, it's sorta supposed to look goofy, so I can handle that - let's switch to Preview mode and see what happens:  There is a gap between the last letter of the last name and the comma - about two letter-width's.  And printing it shows the same problem - way too much room between the last name and the comma. 
      I have quadruple-checked the following:  The fields are touching - I've even tried overlapping by a pixel or two just to make sure, to no avail.  All fields are set to left and top, all padding is set to zero, and, yes, I did check the 'Remove blank space by: Sliding Left' checkbox.  And I've tried the above using the original text fields (plus a new text field for the comma), my added calc fields, and merge fields. I'm also not sure why I have a blank label/page between each entry - may be a field is too close to the edge, but I'll worry about that later.
      I have attached a copy of the offending file for reference.
      I'm sure it's something simple, but I just can't find it - any help would be greatly appreciated!
      Mailing_Label_test_1.fmp12
    • By Tom2001
      Hi from a relative newbie,
      I have a FMP 13 file that works fine on some computers (both Windows and Mac) but on one Mac computer it works only partially. Several of the layouts work fine, but one layout is "frozen" and does not permit entry in any of the fields. Is there something in the Mac OS that could "lock out" a particular layout, but leave all others normally functional? Should I re-install FMP 13? (I'm not sure how to do that on a Mac. I'm mostly a Windows worker.) Any help or insight would be welcome.
      Thanks,
      Tom
    • By fabriceN
      As you know, FileMaker 14 included a new widely used feature: button bars. No need to say why they're awesome, but you've probably noticed it wasn't that easy if you wanted to create a lot of similar buttons, or convert your old button objects into button bars.
      Well, these are not issues anymore, thank's to Federico Basmadyian's ButtonBarTool, available here.