| QUOTE (HHL @ February 03, 2017 04:10 pm) |
| QUOTE (sir hera @ February 03, 2017 06:53 pm) | | [...] A challenge that you have to find 50 caches owned by different charter members.[...] |
This macro snippet filters for caches where the owners are Charter Members. No need to compare anything. |
That assumes that the user has updated the GeoData database with the member status for
every geocacher in the database. It's unlikely that
most GSAK users have a completely up to date GeoData database, given that the GeoData database is
only updated when you use Refresh Cache Data, Get Geocaches or Get Recent Logs using the Geocaching.com Access menu, or use a macro designed to update the information. For example, my GeoData database has 129,952 geocachers listed, of which only 38% have an entry for gMemberType. In my case, HHL's macro is likely to fail to identify 62% of the Charter Members.
The macro I posted above gives sir hera what he asked for, without making assumptions about the state of his GeoData database.
Edited to Add: This code will tell sir hera how complete the Member Type data is in his GeoData database, and therefore how accurate HHL's code snippet will be for him:
| GSK |
$Blank=Sqlite("sql","Select Count(*) From geocacherinfo WHERE gMemberType=''") $NotBlank=Sqlite("sql","Select Count(*) From geocacherinfo WHERE gMemberType<>''") $Total=Val($Blank) + Val($NotBlank)
$PercentNotBlank=Round((Val($NotBlank)/$Total) * 100,0) MSGOK Msg=$NotBlank of $Total Geocachers in your GeoData database ($PercentNotBlank %) have a member type. |
Here's the result when run on my installation of GSAK:
![user posted image]()
If that code shows 100% of the geocachers in your GeoData database have a member type, than HHL's code may be the better approach.