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.

Featured Replies

I'm creating a cookbook DB for my wife. Easy enough. I told her that any fractional quantities will have to be entered as a decimal number. She didn't like that idea, saying that it's easier and less confusing to enter and see "3/4" rather than .75 Ok, easy enough - or so I thought. I would prefer to have the quantity as an indexable numberic value, so that if I want to double the recipe (for example), the calculations will be easy to deal with, and for other programming reasons.

I tried to change the quantity as a text field, and use the texttonum & numtotext in any calculations. That pesky "/" was getting in the way, though. I didn't want to separate out a field for the numerator and another field for the denominator, because not all quantities are going to be fractional.

I suppose that there are a few different ways to tackle this problem (as with any programming problem). I suppose I could figure this out eventually on my own. But I figure it's much easier asking everyone here and having an immediate result, rather than keep banging my head against the wall. I've done enough of that at work, and I'm sure not going to continue at home! Plus I'm sure I'm not the only person out there that has tried this already.

Any ideas will be greatly appreciated. smile.gif

-Brent

Maybe:

Left(quantity; 1) / Right(quantity; 1) ?

  • Author

Oh yea Detlev Sometimes I like to complicate things WAY too much. That will be perfect - as long as the numberator and/or the denominator is only one number long (ex. 1/8) It would be easy enough to make a case statement to determine how many characters are before/after the slash to make other arrangements for the left/right functions.

To anyone reading this - recipies normally won't have measurements smaller that X/8. So for all practical purposes, what Detlev has come up with will be great for what I'm doing. I won't need to worry about the 16th measurements.

Now it's on to figuring out how to convert these number to metric....

Thanks Detlev and Lee!

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.