Jump to content

Converting File Sizes (bytes to Kbytes to Mbytes)


pigaloo

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

Recommended Posts

I have three fields: (F_Size_Bytes, F_Size_KBytes, F_Size_MBytes). I want to be able enter data into anyone of these three and automatically have the other two updated. If this is impossible then how could i have a fourth field (F_Size) be the total number of bytes (even though i inputed say MegaBytes): I understand the math concept (*1024 or /1024) i just don't know how to get filemaker to work this way. One other possible solution is like the one @ http://javascript.internet.com/calculators/download.html where there is only one input field but you press a button to choose the measurement. I would really appreciate some help on this one! (so would my boss laugh.gif" border="0)

Link to comment
Share on other sites

Okay, assuming you will only enter one of the fields, you can use the following guide for the fourth calc field:

Case(not IsEmpty(F_Size_Bytes), F_Size_Bytes ,

not IsEmpty(F_Size_Kbytes), F_Size_KBytes * 1024,

not IsEmpty(F_Size_MBytes), F_Size_Mbytes / 1024,

"")

To do it the other way, entering one number and pressing a button to convert it to whatever you want would be fairly simple as well, but I would probably stick with the above. If you want to try the button thing, let us know and I or someone will help you work it out.

Jeremy

Link to comment
Share on other sites

This topic is 8428 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.