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.

How to show record number in sub-summary

Featured Replies

How to show the record number in a sub-summary layout? It should start at record 1 per group, the parts of the layout are header, sub summary and body, It should look like this

Group A

1 John Doe

2 Jane Doe

Group B

1 John Doe

2 Jane Doe

Edited by chadski021

Thats a tricky one. You may have to sort the records, then loop through them setting the number field (1, 2, 3 etc) before finally displaying your layout. Something like this.

I'm calling the number field (1 , 2 , 3 etc) myTable::index

 

Sort Records [on the sub-summary field]

Go To Record/Request/Page [First]

Set Field [ myTable::index ; 1]

If ( Get ( FoundCount ) > 1

	Set Variable [ $index ; 2 ]

	Set Variable [$currentGroup , myTable::GroupName]

	Go To Record/Request/Page [Next]

	Loop

		If [ myTable::GroupName = $currentGroup ]

			Set Field [ myTable::index ; $index ]

			Set Variable [ $index ; $index + 1 ]

		else

			Set Variable [$currentGroup , myTable::GroupName]

			Set Field [ myTable::index ; 1]

			Set Variable [ $index ; 2 ]

		End If

		Go To Record/Request/Page [Next ; Exit after last]

	End Loop

else

	// there was only one record in the found set so do nothing

end if

 

Edited by rwoods

6 hours ago, chadski021 said:

How to show the record number in a sub-summary layout? It should start at record 1 per group,

Use a summary field defined as Count of  [any field that cannot be empty], Running count, Restart summary for each sorted group.

 

1 hour ago, rwoods said:

You may have to sort the records, then loop through them setting the number field

That would create a conflict when two users want to produce different reports.

Ah yes, comment got the right answer, mine was both long winded and not safe for multi-users!

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.