Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

counting records in a leading sub summary part

Featured Replies

  • Newbies

Hi all,

Novice here.  I have a simple two table database for inventory tracking.  Parent table "Cases" and child table "Items".  The cases can be filtered by finding all cases with the field  "Status" set to 'Yes' or 'No'

I am able to create a report Layout with the found set with the field 'Case Name' in a Leading Sub Summary part and the content field of each case (Items) listed in the body part.  What I am struggling with is a way of having a field in the Leading Sub Summary part along with the 'Case Name' that sequentially numbers the Cases in the found set from 1 to xxx

Can anyone help me please?

I am a bit confused by your description. I presume your report layout is based on the child Items table? Therefore, if you want the report to include only items in cases whose status is "yes", you must perform the find in the Items table too. IOW, instead of:

57 minutes ago, John Marzano said:

finding all cases with the field  "Status" set to 'Yes' or 'No'

you need to find all items with the related field "Status" set to 'Yes' or 'No'.

Now assuming that is so, to your question:

Unfortunately, numbering sorted groups is not easy. The simplest method I know of requires two fields (both defined in the child Items table):

sListOfCases - a Summary field, defined as List of [ CaseID ];

• a calculation field (result is Number) =

Let ( [
cases = UniqueValues ( Items::sListOfCases ) ;
index = Position ( ¶ & cases & ¶ ; ¶ & CaseID & ¶ ; 1 ; 1 )
] ;
ValueCount ( Left ( cases ; index ) )
)

where CaseID is the match field to the parent Cases table and the break field for your report.

Place this calculation field in your sub-summary part.

 

  • Author
  • Newbies

Hi comment.

Your analysis of my amateurish explanation is correct.  The report is based on the childitems table.

In the screen grab below, the text in red should be where the sequential case number should go based on how many cases are found that have the status "Yes" (as in "Ship? Yes or No").. So Microwave TX would be case number 1 and mini Eclipse AKS would be case number 2 etc etc.

I'll try and implement your suggestion and thank you very much for your help. Greatly appreciated!

image.thumb.png.00411a653772469680dfa8559ab99207.png

  • Author
  • Newbies

Hey comment,

Great work with your solution! It worked a treat.

That would have taken me forever and a great deal of studying to work out so thank you!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.