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.

Records Count

Featured Replies

I know this is a basic calculation, but I am brain dead today... Is there a way to have a field count the current records. If you have 10 records in a layout, the field says "10" like on the sidebar, but in a field...

Thanks

Hi,

Create a calculation Field using

Get(FoundCount)

Michael

  • Author

That was the trick...Thanks

  • Author

Hmmm. One more issue. If I make a record, it says "1", if I delete it and there are no records it still says "1" instead of "0". How do I fix that?

Make sure the storage option is set to Do Not Store.

Michael

  • Author

Then that presents a new issue. The field must be a global so it will show up in my main menu. So since it is global it will not allow me to check do not store.

What do you mean by "Main Menu"?

Michael

  • Author

I have a set of databases linked together. the Main Menu is the navigation between all of the databases. Investigation, contacts and so on. All are linked by relationships but seperate .fp7's. I need to show the number of records in each .fp7 on the Main Menu.

If I understand you correctly is that you want to know how many records are available in a particular table while you oer on the main menu which has ONE record? if that's the case, you can do it by creating a cartesian product relation. Use the "x" instead of your usual operator "=" for the relation and base your count calculation on the cartesian product.

NOTE: in pre-FM7 most developers used common_one and relate using a calculated "1" for the relationship.

Edited by Guest

  • Author

doesnt work either since there are no actual relationships, just table references in the relationships.

  • Author

I just found out that if the records are deleted, the number listed in the menu stays at the last count and does not revert backwards. Thus if there were 5 records in investigations, and we delete them, the number in the main menu stays at 5... So it counts up but does not go back to 0. I think I need another way of counting the records...

doesnt work either since there are no actual relationships, just table references in the relationships.

Create the relationships needed and create the unstored calc field in each file and display the fields from the other tables in the main menu.

Michael

  • Author

Hmmmm...I will try that...

  • Author

Please bear with me, I am really bad with relationships...no phun intended : But how do I make a relationship between the main menu with no relating fields in it but globals? If there is no data in a set field because the Investigations.fp7 has no records, how can it relate to the Main Menu?

  • Author

I got it...DUHHH!!! I make a field for each section I need to have the count of. Relate thenm by that field using "x" and it works great...Thanks guys, I was brain dead for a while...

For some reason I had a feeling it was going to come to you.....lol.

Glad you got it working.....:

Michael

  • Author

It is amazing what you can figure out when you start telling yourself, you look real bad...you have been doing this for a long time, they must think you are drunk... I just had to stand back and look at it logically without all the emotion..

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.