Jump to content
Server Maintenance This Week. ×

How to get the size of an individual record?


K1200

This topic is 4491 days old. Please don't post here. Open a new topic instead.

Recommended Posts

FMP databases contain tables ... and each table contains records. But records can differ markedly in size according to the current contents of individual fields ... most notably, text fields and containers.

Is there any way to Get Size(Record N)? ... without having to add up the sizes of the individual fields (which can be dozens).

Thanks in advance for any assistance.

Link to comment
Share on other sites

My objective is a quick database analysis tool ... that can operate at a high level to spot problematic records where, for example, the user has placed 50 pages of text in an "allow override" field. Yes, containers are an even bigger problem to manage ... and I'm working on that right now.

So, any ideas on a simple Get Size?

Link to comment
Share on other sites

The Length() function will return the number of characters in a field, which might be a good approximation to the field's storage "size" but this does not take unicode or formatting into account.

If you are worried about 50 pages of text in an allow override field, then use field level validation and/or auto-enter calculations to limit the data entered and clean it up if necessary. Otherwise you might find that your efforts to "solve" future problems become usability problems, because users always find ways of using a database to solve their problems that the developer never dreamed of (or intended).

Link to comment
Share on other sites

I understand your goal and I believe it is a worthy one. At one time, I attempted something similar. All I could think to do was create an empty clone and look at the file size then manipulate, add/delete records and then reading file size again. The purpose was to find out how much bloat could occur depending upon how I set field indexing.

I do not have an answer either. If time, I will try to consider it further. In meantime, I will watch this thread as well. Thank you for bringing this up. :`)

Link to comment
Share on other sites

This topic is 4491 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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