Calculated Fields

by camel

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

Version:

1.2.9.4

Updated:

Apr 11, 2011

Calculated Fields Plugin together with Copy Data Plugin

Calculated Fields Plugin together with Copy Data Plugin

Postby tndmbkr » Fri Apr 11, 2014 1:47 am

Problem: When I copy data (Copy Data Plugin by OMB) from one logbook to another, the Calculated Fields in my Custom Data Fields (CDF) of the activities are doubled/ tripled.
Which will result in an error message by Calculated Fields

In ST3, the CDF are stored in the logbook. Not in the configuration file of ST3.
Calculated Fields are presented as a CDF, but are stored in the configuration file of ST3.

In logbook1 I have CDF about all kinds of data, and some Calculated Fields
When I copy an activity from logbook1 to logbook2 (same computer, same installation, same configuration), I will have two sets of the same Calculated Fields in logbook2.
After which I have to define, and recalculate all Calculated Fields of all activities in logbook2 once again.
I do not have this problem with the other CDF.

What can I do to remain free from this problem?
tndmbkr
 
Posts: 233
Joined: Wed Jan 11, 2012 2:39 am
Location: Rotterdam

Re: Calculated Fields Plugin together with Copy Data Plugin

Postby old_man_biking » Fri Apr 11, 2014 4:00 am

Please see my answer to your other post on this issue:
viewtopic.php?f=69&t=15856&p=83379#p83380
OMB
old_man_biking
Donated!
Donated!
 
Posts: 6512
Joined: Mon May 28, 2007 8:07 am
Location: Munich, Germany

Re: Calculated Fields Plugin together with Copy Data Plugin

Postby tndmbkr » Sat Apr 12, 2014 3:00 pm

Unfortunately I could not reproduce this problem in a clean environment, today.

I started with a very clean installation of Windows (W7), and a fresh+clean installation of Sporttracks3.1.5202 with only two plugins.
I created a new logbook with one activity (no athlete, no equipment, just a date with distance and time)
This activity has two Custom Data Fields (CDF1, CDF2)
CDF1 is just a numeric entry field
CDF2 is a Calculated Fields (Activity Time)

Then I created an empty logbook; logbook2
This logbook does not have Custom Data Fields
Though the settings for Calculated Fields tell me there is a Calculated Field called CDF2 with a formula
I can test this Calculated Field without getting an error message

Then I copied the activity from logbook1 to logbook2
In logbook2 this activity has two Custom Data Fields, CDF1 and CDF2. Just like in logbook1
When I change the activity time in the summary view of logbook2, I can calculate a new value for CDF2, without getting an error message

When I copy a second activity from logbook1 to logbook2
I can recalculate the value of CDF2 without getting an error message.
And I do have only one set of Calculated Fields.

:twisted:
I will continue my quest.

==================================
2014-04-13
I changed the name of CDF1 and CDF2 in the Logbook Properties
The names of the Calculated Custom Fields were automatically adjusted accordingly.
Both in the settings for Calculated Fields as in the CustomDataFields view of the activity
I did not have to Update the change of names in the settings of Calculated Fields.
The Test of Selected Rows was OK
Recalculation of Calculated Fields was OK
tndmbkr
 
Posts: 233
Joined: Wed Jan 11, 2012 2:39 am
Location: Rotterdam

Re: Calculated Fields Plugin together with Copy Data Plugin

Postby tndmbkr » Sun Apr 13, 2014 6:54 am

ST3 is not the easiest software to use.
Nice graphs. But very difficult to handle.
All day one has to think very carefully what one is doing.

When I make a new logbook (logbook11) on my computer, while logbook1 is opened, it will not contain the Custom Data Fields of logbook1.
BUT in the settings of Calculated Fields, all Custom Data Fields of logbook1 are visible.
Though they are not visible in the Custom Data Fields view of the activity.

Now it is very tempting to define new Custom Data Fields on the logbook properties page, with the same name as the Calculated Custom Fields that already exist.
But one must NOT do that. As OMB has explained above.
Unfortunately the Calculated Fields plugin does not warn you for this reverse working order.

Where did I go wrong?
I copied an activity from logbook1 to the new logbook11, with the Copy Data plugin.
The Custom Data Fields should be included in this copy and paste action.
But for some reason this field did not become visible in the Custom Data Fields view of this activity in logbook11.
Maybe because the Calculated Custom Field of this particular activity had no value.
(the other Custom Data Fields with no data entry were not copied either)

These empty Custom Data Fields only became visble after I had copied an activity with Custom Data Fields with a data entry from logbook1 to logbook11.
But at that time I already had made that tempting mistake to define new Custom Data Fields with the same name.
tndmbkr
 
Posts: 233
Joined: Wed Jan 11, 2012 2:39 am
Location: Rotterdam


Return to Calculated Fields

Who is online

Users browsing this forum: No registered users and 1 guest