Calculated Fields

by camel

Downloads: 23,629 (9) • Reviews: 4

Version:

1.2.9.4

Updated:

Apr 11, 2011

HowTo use Calculated Fields

HowTo use Calculated Fields

Postby BF68 » Sat Oct 22, 2011 10:15 am

Hi All,

I believe this Pug-in has great potetnial. However I cannot make it work for me. I use the latest verison of FT 3.0 and have .NET 3 SP1 installed.

As a first test I wanted to calculate a moving average of my weight.I found the Tutorial however it doesn't work.

I've defined 2 new fields in the LogBook -> Properties area.
NewFields.jpg
NewFields.jpg (81.9 KiB) Viewed 6937 times


When I try to do now a calculation for one of these fields, I only can select the predefined fields but my own self defined fields don't show up:
NoCalcFields.jpg
NoCalcFields.jpg (119.56 KiB) Viewed 6937 times


Additionally when I try to select a source field for calculateion in the "Expression area" with right mouse click, nothing is shown in the "Expression area".

Could anyone provide me with some hints?

Many thanks in advance!

Best regards

Bernhard
BF68
Donated!
Donated!
 
Posts: 10
Joined: Fri Jan 02, 2009 9:41 am

Re: HowTo use Calculated Fields

Postby camel » Sat Oct 22, 2011 11:24 am

I'm not so sure in German. But I think that you are choosing as destination custom field for calculation an athlete custom field.

And that's not yet supported in plugin.

You can use athlete custom fields in calculations to calculate something but as an destination field you must use an custom field on activity.

Do you have a point?

Nice day
Peter
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Re: HowTo use Calculated Fields

Postby BF68 » Sun Oct 23, 2011 2:13 am

Hi Peter,

Yes you're right, I tried to calculate an athlete field. When I define a field "Athlete Weight" as an activity field then it works, I can assign the athlete weight to that field and the value is selected which is from the same date as the activity or if no weight is avaialbale then the weight value from the last date before the activity is selected.

Just a few more questions:
1) Do you plan to support athlete fields or equipment fields with your great plug in?
2) Is there somewhere a list of functions and operaters avaialble which could be used in the Expression area and in the Condition area?
3) What purpose does the "Nested Expressions" and the "Virtual Expressions" have?
4) Would you be interested to get your fron-end transalted to German language? I've no idea how that would work however I'd be happy to provdie translation from Englisch to German (mother tongue)

I'm looking forward to your feedback.

Best regards

Bernhard
BF68
Donated!
Donated!
 
Posts: 10
Joined: Fri Jan 02, 2009 9:41 am

Re: HowTo use Calculated Fields

Postby camel » Sun Oct 23, 2011 6:16 am

1) for a very limited support of used equipment try to use an {EQUIPMENT} in formula, to get a point what it does do. (to be fair, I don't remember what it does now ;) )
For now I don't plan a support for athlete fields as destination fields for calculations. Probably in some major upgrade of plugin in future.
2)there are tutorials on this page: http://code.google.com/p/calculatedfields/w/list
But this plugin is interpreting your expressions in fact in c# syntax. So you can use nearly every c# operator and functions. Here is an list from MSISDN:
http://msdn.microsoft.com/en-us/library ... 80%29.aspx
3)I recommend to you to go through formulas pool on this address to get an new ideas and there are some things described whey they were developed. So it's nice source of ideas about plugin:
viewtopic.php?f=67&t=9262
But in very short:
Nested expression: you can use them inside of normal expressions (they are in fact macros, just to make some expression reusable or shorted etc.)
Virtual expression:
I will just quote my post from formulas pool thread explaining this concept:
In cases when you need dummy custom fields. For example if you want to calculate this thing for QuarterDistance, you can now use just added new concept of Virtual expressions.

So you will first go to Virtual expressions tab.
Here you will create new row:
Virtual Field:QuarterDistance
Expression:{DISTANCE}/4

And than you can use this field as normal field in your calculations:
{RangeElapsed(Distance,0,{QuarterDistance})} / {QuarterDistance} * 1609

This field QuarterDistance will be calculated for given activity, but it will be not written on activity custom field. It's only virtual field for usage in formulas.

Probably you get that idea. I'll add a tutorial for this concept later.
Please use it only if you feel need of creating dummy custom field calculation.

Most of users just don't need to understand it. This concept is needed only for advanced calculations. But it enables some powerfull things that were too difficult before.

4)for now I don't plan to support translations, it's nice to use same expression in german or english. If fields usable in calculations would be translated this would be not possible.
Of course GUI could be translated, but I still think that there are more important things to do with plugin if there wil be enough time.

Nice day
Peter
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Re: HowTo use Calculated Fields

Postby camel » Sun Oct 23, 2011 6:20 am

If you will study formulass pool, you will see that there is described an "secret" DataTrack feature.

This is in fact most powerfull part of plugin, officialy not very supported. But with this you can do nearly anything.
But you need some programming skills, because it use linq from c#.

So if you are programmer this will be nice feature for you, if not, still most things could be done without it.

Nice day
Peter
camel
Donated!
Donated!
 
Posts: 363
Joined: Tue May 18, 2010 7:14 am
Location: Slovakia

Re: HowTo use Calculated Fields

Postby BF68 » Sun Oct 23, 2011 10:04 am

Hi Peter,

Many thanks for your detailed replies. I'll check the provided source of documentation.

Best regards

Bernhard
BF68
Donated!
Donated!
 
Posts: 10
Joined: Fri Jan 02, 2009 9:41 am


Return to Calculated Fields

Who is online

Users browsing this forum: No registered users and 1 guest

cron