Allow negative food amounts
#1
FitDay Member
Thread Starter
Join Date: Jan 2012
Posts: 7
Allow negative food amounts
It would be nice if the daily food tracking section allowed the entry of negative amounts. Currently when entering a negative quantity of any food, I get the "One or more of the values you entered are invalid" message and cannot proceed until I remove it.
It would be good to keep negative numbers highlighted in red to distinguish them, but the site would be more useful if it didn't reject such entries outright.
It would be good to keep negative numbers highlighted in red to distinguish them, but the site would be more useful if it didn't reject such entries outright.
#3
FitDay Member
Thread Starter
Join Date: Jan 2012
Posts: 7
OK, actually, I have many custom foods which are complex recipes. Sometimes I substitute ingredients, and when I do that it would be far easier to enter a negative quantity for the supplanted item than to re-create the whole recipe.
#4
Ah, I see, that makes sense, I guess. I've never tried it, but can you enter "0" or, say, ".01" or some very small number to accomplish the adjustment? I don't think entering a negative will ever be a feature, but you never know.
Regards,
Michael
Regards,
Michael
#7
#8
FitDay Member
Thread Starter
Join Date: Jan 2012
Posts: 7
As far as the mechanics of making this work are concerned, the core of the food site's basically a giant spreadsheet with sums, and it almost certainly takes more coding to identify and reject negative numbers than it would to admit them to the calculation. If the existing detection algorithm led to a "negative quantity, are you sure (Y/N)?" confirmation dialogue, rather than a simple errormsg/halt, I'd think you'd have something like an ideal solution without much effort.
#9
Zero quantity doesn't really solve the problem, alas--for example, if I make Beef Stroganoff (custom food with 10 or more ingredients) but decide to substitute ground turkey for the beef, the most efficient way will be to log the stroganoff and the turkey as normal, then add in a negative amount for the beef I didn't have.
As far as the mechanics of making this work are concerned, the core of the food site's basically a giant spreadsheet with sums, and it almost certainly takes more coding to identify and reject negative numbers than it would to admit them to the calculation. If the existing detection algorithm led to a "negative quantity, are you sure (Y/N)?" confirmation dialogue, rather than a simple errormsg/halt, I'd think you'd have something like an ideal solution without much effort.
As far as the mechanics of making this work are concerned, the core of the food site's basically a giant spreadsheet with sums, and it almost certainly takes more coding to identify and reject negative numbers than it would to admit them to the calculation. If the existing detection algorithm led to a "negative quantity, are you sure (Y/N)?" confirmation dialogue, rather than a simple errormsg/halt, I'd think you'd have something like an ideal solution without much effort.
Personally, and I know it will throw your numbers off a bit, I'd simply reduce the amount of "beef" stroganoff I ate to adjust for the lower calorie version. I admit that I do this quite often as for me, the calories are most important. The nutrition part of the equation may be more important to you, and of course this would throw those number off as well.
Regards,
Michael