Memento DB Newbie need help

Skip to first unread message

Beth Dixon

Jan 28, 2018, 8:25:31 PM1/28/18
to mementodatabase
I created two DB, Favorite Foods and Calories In/Out. In Favorite Foods I have fields for Calories, Fats, Carbs, Protein etc values of the food.

In Calories In/Out DB I have similar fields. I have created additional page in Calories In Out DB, and called it My Foods.

I created a link to entry field (one to many) on this page as well as a field (real number) for entering qty of food.

Then in Main page I created a calculation field for Total Calories with following calculation #{favorite foods 1.actual calories}*#{qty 1}+#{favorite foods 2.actual calories}*{qty 2} etc.

This works and properly multiplies and sums all foods picked from the link to entry fields. The problem is I can't get it to multiply and sum fat field in Favorite Foods DB. I get a cannot resolve variable with name error.

I need my Calories In Out DB to access My Favorite Foods DB and simply multiply and sum total nutrients consumed. Can anyone advise?

Bill Crews

Jan 29, 2018, 8:33:14 AM1/29/18
to Beth Dixon, mementodatabase
Since, in your database, the fat field(s) in the Favorite Foods library are really equivalent to the calories, carbs, and proteins fields, there is no structural reason to get an error on one and not the other. So, I would suggest verifying that the field name for fat is really precisely the same in Favorite Foods and in the Calc field script. If they seem the same, there could still be an invisible special character or something, so it would be best to delete and re-enter the fat portion of the script. If nothing else works, delete and re-enter the entire script.

If you still have trouble, then look at your data. Is there something different about the fat data? Is it the only field where you have decimal points or something like that? In JavaScript, it shouldn't matter, but I really don't know Calc fields very well; something like that could maybe be an issue, at least in how the error measure is displayed.
Reply all
Reply to author
0 new messages