|
GSAK (Geocaching Swiss Army Knife)
|
|
AddNew This command will add a new blank record in the current table. Like the GOTO command, the ADDNEW will action on the current Table. So to add a new child waypoint the code would be: Table Active=Waypoints Scope=Parent AddNew $d_cCode = "XXXX" $d_cType = "Parking Area" $d_cLat = "-33.1456" $d_cLon = "115.5643 .....etc The ADDNEW command will add a record to your current table and set all the required fields to the minimum default values in order to make it a valid record. It is then your responsibility to populate/change your required fields. Warning: There is a "Gotcha" when using AddNew for table "Caches" and a filter is set and you have speedmode set off. The "AddNew" command will add a "blank" record to the database and when speedmode is off the database engine reflects your current filter immediately. That is, if your current filter is set such that the new record is "excluded" then the database engine forces the first record in your filter to become the current record. This can lead to "weird" looking behaviour when adding records. Take the following simple example. You currently have a filter on "User flag = set" All you want to do is add a new waypoint and change the code to "Way001". The following code looks like it should do the job: AddNew $d_Code = "Way001" See the problem? The AddNew command adds a new blank record and the default value for the user flag is set to False. This means that the newly added record is not a record that exists in your current filter, so the current record now becomes the first record in your Filter, and it will actually be that record that gets its code changed to "Way001". This is not what you want. Unless you are 100% sure the AddNew record will satisfy your current filter, It is strongly advised that you make sure speedmode is on before using AddNew. Summary |
|
Copyright 2004-2008 CWE Computer Services Privacy Policy Contact |