March 29, 20178 yr Hello I am having table in which I am sorting with a particular field. I am getting following type of view after sorting: Group 1 ---------- Item 1 Item 2 --------- Group 2 -------- Item 1 ------- Group 3 etc. When only 1 record is found after sorting records, I don't want to show that record on sub summary part. Is there any way so that I can hide sub summary part ( or may be body part ) when I am getting only one record? More detail can be found in the attachment. Please let me know for any issues. Requirement.pdf Edited March 29, 20178 yr by Tattwam
March 29, 20178 yr Hi Tattwam Firstly, I strongly recommend that you just live with the fact that both the sub-summary and the line item show. It will make you life much easier as that is how FileMaker is designed to work. However... The first way I can think of to do this would be to use the sliding features of FileMaker, along with the 'Also reduce the size of the enclosing part'. You would need to make the fields that show on the body be calculated fields, and they should evaluate to nothing (i.e. "") when that item is the only one that matches that sub-summary field in the found set. That isn't easy, but could be achieved by doing a PatternCount of the SubSummary field contents on a list that is calculated from the sub-summary field in the found set. If the PatternCount is '1', then it is the only record that matches, and the calculated field should be "" If you setup the parts in the body to slide upwards and reduce the size of the enclosing part, then the body can be made to reduce to almost nothing. It would be fiddly to set all this up, hence my recommendation not to bother, and just live with the native behaviour!
March 29, 20178 yr 9 hours ago, Tattwam said: Is there any way so that I can hide sub summary part ( or may be body part ) when I am getting only one record? Are you asking about a printed report, or do you want this happen on-screen in Browse mode? I don't think the latter is possible. 7 hours ago, rwoods said: That isn't easy, but could be achieved by doing a PatternCount of the SubSummary field contents on a list that is calculated from the sub-summary field in the found set. I am afraid I have no idea what you're describing here. Determining the size of the group is easy: you need a summary field that count records, and a calculation using the GetSummary() function.
March 30, 20178 yr Ah yes, comment is correct, that would be a better way to determine if the record is on it's own in a SubSummary group. However, making any of this happen in browse mode is impossible, sliding objects only work when printed/PDF'ed
March 30, 20178 yr You could put a button over the entire body part, one row high, and conditionally format it to mask the one row in the body part. You will still have a white space, but you won't see the data. Here's a screen shot with 2 sub-summary parts, expanding/collapsing. Due to the function of the expanding collapsing list view, when it's collapsed it always leaves one record, so I covered it.
April 3, 20178 yr You can check the number of records found with Get( FoundCount). To get rid of the subsummary, simply don't sort. So effectively, you'd use: if[ get( FoundCount ) > 1 ] sort records else unsort records endif
Create an account or sign in to comment