Not able to get Default Values for Data Field to work

225 views
Skip to first unread message

Henrik Næss

unread,
Jul 23, 2016, 4:42:25 AM7/23/16
to golden-cheetah-users
Hi, I'm not able to get Default Values for Data Fields to work. What I want to archieve is when I import new rides is that they are populated with my default Equipment.

I have tried to follow the guide on GitHub to configure Default Values for Data Fields (Tools -> Options -> Defauls) but not I'm not able to get default values to work. Have anyone an basic example that is working, so I can start playing around out of a working example.

I will import  .FIT (for new rides), .TCX and .GPX (for old) files.


Henrik/
using Build id #3944 (v4.0-dev1607)

Jean Div

unread,
Jul 23, 2016, 7:41:24 AM7/23/16
to golden-cheetah-users
I'd also be very interested in getting this set up.. particularly to use the new (ish) Garmin 'Ride Type' identifier as described here to auto-populate the fields.

E.g. 'Ride type' = MTB, so populate Sport in GC = 'Mountain Bike' and Bike = "Swift Evil Twin", or 'Ride type' in Garmin = Road so Populate the file in GC with Sport = Bike and Bike = Swift Ultravox.

Perhaps this is a step further than what you are referring to and a bit optimistic though?

Ta,
Jean


Ale Martinez

unread,
Jul 23, 2016, 9:20:57 AM7/23/16
to golden-cheetah-users
Henrik, defaults work as described BUT the implementation has an -AFAIK- undocumented limitation: they are triggered when you change the field manually, not when the field is set automatically on import, for example with the following defaults:

If I import a ride from PowerTap and set manually Sport to "Bike" the Equipment field is set to SLC but when I import a Garmin Run and Sport is automatically set to "Run" the Equipment field doesn't change.

Jean Div

unread,
Jul 24, 2016, 4:00:14 AM7/24/16
to golden-cheetah-users
I have just set this up, as above and it causes a crash in the July Dev release on my Mac. Crash logs attached.
GoldenCheetah_2016-07-24-095416_Seugnets-MacBook-Pro.crash
GoldenCheetah_2016-07-24-095628_Seugnets-MacBook-Pro.crash
Message has been deleted

Ale Martinez

unread,
Jul 27, 2016, 9:14:27 AM7/27/16
to golden-cheetah-users
El domingo, 24 de julio de 2016, 5:00:14 (UTC-3), Jean Div escribió:
I have just set this up, as above and it causes a crash in the July Dev release on my Mac. Crash logs attached.

Hi Jean, I could reproduce the crash once in LInux when the linked field -Equipment in the previous example- is not defined in Data Fields, but I don't have a Mac at hand to test, please confirm if this is also your case. 

Ale Martinez

unread,
Jul 27, 2016, 4:15:07 PM7/27/16
to golden-cheetah-users
 Linked defaults should work also on import starting from the next development build.

Jean Div

unread,
Jul 30, 2016, 4:05:57 AM7/30/16
to golden-cheetah-users
Yeah, I can reproduce in that it crashes the first time round every time that I load the new activity. Once GC restarts, and I try again.. it works, but then crashes on the following 'new file' again.

Should I upload more crashlogs..?

Good to hear that it will auto-process in the new builds. This is a bit of functionality that I've barely used, but I can see how it will be very useful, e.g.
  • Auto-specify a particular bike by workout type (I track miles of my bikes by bike names)
  • Auto-specify shoes by workout type (I don't track shoe mileage, but know that some people do)
  • Auto populate most likely values for a workout type - my standard gym set is 30m with a known TSS and Workout name - GC can populate this
  • Auto populate Workout code from the workout name (I have a routine of workouts, and it can be nice to auto-populate one from the other)
  • Auto populate a change in CP to compensate for indoor trainer sessions (If Sport=Trainer, CP=fixed value). Is there a way to adjust CP by a % rather than fixed value here, BTW?
What else am I missing here..? Anyone else have a useful recipe?

Ta,
Jean

Jean Div

unread,
Dec 5, 2018, 1:03:22 PM12/5/18
to golden-cheetah-users
Hey Ale

Been a while :-)

Just picking up on this - I'm now running a windows box, and same effect - lots of crashing, as above. Also, still not reading on 'auto load', eg. if I stipulate a device to set default values for, not much happens. If I change the fields manually, then it works after crash and reload.

Would be nice if, for example, my Quarq power meter was listed as a device, and so GC picked up that it was a road ride.. then because it was a road ride, default bike was 'Specialized Tarmac', for example.

A more complex one is if no power meter, then mountain bike, if mountain bike, tick the custom field of 'flat pedals', etc.

Tx,
Jean 

Jean Div

unread,
Dec 5, 2018, 1:23:31 PM12/5/18
to golden-cheetah-users
On a related note, I can't seem to find it in the forums but it realates to this and filters - I'd like to set my custom field, a checkbox named 'Flat Pedals' to auto populate when I select Sport=Mountain Bike. I've tried Flat Pedals=1, Flat Pedals=true, Flat Pedals=yes, Flat Pedals=checked.. no luck yet.

Any hints for this, and then filter too?

Tx again,
Jean

Ale Martinez

unread,
Dec 5, 2018, 7:15:00 PM12/5/18
to golden-cheetah-users
El miércoles, 5 de diciembre de 2018, 15:03:22 (UTC-3), Jean Div escribió:
Hey Ale

Been a while :-)

Just picking up on this - I'm now running a windows box, and same effect - lots of crashing, as above. Also, still not reading on 'auto load', eg. if I stipulate a device to set default values for, not much happens. If I change the fields manually, then it works after crash and reload.

The only change related to this was to enable defaults processing on import, for example I have a couple of rules to set Equipment based on Sport which is automatically set on import:

Defaults.png


They work but, both the Field and Linked Field (Sport and Equipment in this case) need to defined in Fields to avoid crashes as I pointed out 2 years ago:

Fields.png


We need to fix this validating the definition or, directly, only allow the entry of previously defined fields.


Would be nice if, for example, my Quarq power meter was listed as a device, and so GC picked up that it was a road ride.. then because it was a road ride, default bike was 'Specialized Tarmac', for example.

I'm not sure this is even possible since we receive information about the head unit, not the PM downstream, AFAIK.
 
A more complex one is if no power meter, then mountain bike, if mountain bike, tick the custom field of 'flat pedals', etc.

See above. 

Ale Martinez

unread,
Dec 5, 2018, 7:29:58 PM12/5/18
to golden-cheetah-users
El miércoles, 5 de diciembre de 2018, 15:23:31 (UTC-3), Jean Div escribió:
On a related note, I can't seem to find it in the forums but it realates to this and filters - I'd like to set my custom field, a checkbox named 'Flat Pedals' to auto populate when I select Sport=Mountain Bike. I've tried Flat Pedals=1, Flat Pedals=true, Flat Pedals=yes, Flat Pedals=checked.. no luck yet.

set(Field, 1, filter) or set(Field, 0, filter) should work. 

Ale Martinez

unread,
Dec 5, 2018, 7:59:20 PM12/5/18
to golden-cheetah-users
Also field names with spaces are not a good idea if they will be used in formulas, the spaces are replaced by _ so the filter should be Flat_Pedals<>0
Reply all
Reply to author
Forward
0 new messages