Calculated Fields

by camel

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

Version:

1.2.9.4

Updated:

Apr 11, 2011

Different Formula Based on Specific Sport

Different Formula Based on Specific Sport

Postby cornfed » Sat Aug 03, 2013 1:20 pm

Is it possible to use a different formula based what sport or activity you have? I'm trying to implement "Aerobic Points" as defined on SlowTwitch (http://www.slowtwitch.com/Training/Gene ... em_15.html). Basically you get "points" based off your training distances but they very based on the specific sport or activity,

1 mile cycling = 1 point
1/4 mile running = 1 points
100 meters swimming = 1 point

Could I do something like this with the plug-in?

Thanks,

Drew
cornfed
 
Posts: 5
Joined: Sat Jul 13, 2013 9:20 am

Re: Different Formula Based on Specific Sport

Postby dirk66 » Sat Aug 03, 2013 4:40 pm

Hi

if isn't posible in a calculation however {CATEGORY}.Contains("...") in the condition field is posible.
I haven't tried it my self, but create 4 custom fields: one for swimming, one for cycling and one for running wich counts the points for those categories. And one field which counts the results in the other 3 fields.

Probably you get the best results if the last field is the last in the row of being calculated :wink: so give that Last field a name wich starts with a z or so. Not sure however if the plugin uses an alphabetic order to calculate the fields.

Success
Dirk
dirk66
Donated!
Donated!
 
Posts: 534
Joined: Thu Feb 26, 2009 6:40 am
Location: Oss, Netherlands

Re: Different Formula Based on Specific Sport

Postby dirk66 » Wed Aug 14, 2013 4:25 am

(({CATEGORY}.Contains("Fietsen")) == true) ? {DISTANCE}/1000 : ((({CATEGORY}.Contains("Roeien")) == true) ? {DISTANCE}/250 : (({CATEGORY}.Contains("Skaten")) == true) ? {DISTANCE}/500 : 0)

Does something like you want. cycling is 1 point for each km rowing is 4 points per km and skaten is 2 points per km.

change the categories into yours and it should work.
If isn't posible but ? acts like an if statement: evaluation ? value true : value false

regards
Dirk
dirk66
Donated!
Donated!
 
Posts: 534
Joined: Thu Feb 26, 2009 6:40 am
Location: Oss, Netherlands


Return to Calculated Fields

Who is online

Users browsing this forum: No registered users and 1 guest