Calculation help

focault

Member
HI,

I need some help with some calculations.
I have a site which the user need to enter details on a form 6 times a day.
This form is filled out by the user upto 6 times a day, it records the amount of meals eaten and the content of the meals. The user has to fill in how many calories the meal was and how much water they drank.
On the user profile I have modules to show the results from all the different types of forms the user has to fill in.
On the profile should also show a total for the week of calories and water, this is where I need the help.
I want a total for the Calories and Water-totals per day and also per week. Later on I also want to show these in graph form.
I dont know the best way to do this or how to do this. Would it be best to make a new list that joins to the Nutrition Diary list and then perform the calculations? or use database join elements in the Nutrition Diary list? or make a view in phpmyadmin?

On the site there are many other forms that need calculations doing on them but hopefully I can work them out myself once I understand how it works.

To take a look at the user profile with some dummy form data you can login in the front end with :user: sam :pass:demo123
I have entered all the details needed in "mysites" the list/form is called Nutrition Diary.

Thanks very much in advance for your help.
 
Hi it is now Friday and I have not had even a reply on this.
I really need to get moving on this part of the project because many of our forms require some kind of calculation.
 
I'm dealing with some sever medical issues atm, some spine surgery. I know this doesn't help you, but it is what it is, and I'm aware we have a lot of pissed off customers atm. Doing my best to keep up. Got you on Skype now, taking a look.

-- hugh
 
OK ... well, we got as far as creating a view which sums the calroies and water consumption per user per day, before you accidentally dropped all your database tables and then deleted your backup folder. Oooops. You are currently working on recreating your test site.

You still have that notepad with the CREATE VIEW statement we used. So if I'm not around when you get your site rebuilt, recreate that view, and build a Fabrik list on it (make sure you select the 'id' field as the PK in your list, even though MySQL views don't have Primary keys, we still need to know which field to use as the unique rowid). Once you have the Fabrik list built, you can then use all the usual ways of displaying / filtering it.

For the content plugin issues you mentioned, where it's just rendering the {fabrik ...} string instead of the actual list / viz / whatever, double check that you really have published / enabled the Fabrik Joomla Content Plugin. Pretty much every time I've ever seen that issue, it's ebcause the content plugin hasn't been enabled.

-- hugh
 
BTW, thank you for your understanding in our Skype conversation. I know my health issues and us essentially over-extending ourselves with the JED project are not an excuse for not meeting our support obligations ... but "it is what it is". We're working as hard as we can, and the advantage of doing the JED thing is, it is also the core of what will become Fabrik 4. So it's code we were were going to have to write anyway, it just accelerates the process of having a totally rebuilt fabrik, which will me much easier for us to maintain and keep up with changes in J! with.

I hope you will bear with us, and that we can get all your issues resolved today.

-- hugh
 
We had a good Skype session tonight and were able to make a view that totals up a daily total for the Calories that I should be able to copy to other elements that need a total.
Thanks again ;)
 
any update on this? really need to get this sorted this week because I am on a deadline with this site.
Thanks!
 
Hi
I am covering Hugh whilst he is in hospital.
I tried logging in to your sites admin with the username and password that you provided in "my sites" but it won't let me log in. Could you ensure the credentials are correct and that the user has access to the admin please?
 
We had a good Skype session tonight and were able to make a view that totals up a daily total for the Calories that I should be able to copy to other elements that need a total.
I'm not sure I see a view calculating the calories? Has a fabrik list been made of it, if so which one?
I' still unsure what needs to be done here, the thread reads to me like it was fixed, but obviously that's not the case. Could you outline for me what has already been done and what is left to do?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top