QUOTE (Beaglebrigade @ August 31, 2013 07:11 am) |
When caches are updated via import of Pocket Queries, I would appreciate having the PQ name stored as well. Advantages include the ability to sort or select caches based on which PQ brought the cache in. I frequently make use of what could be called "transient" PQ's that I create and import when going to a new geographical area such as a vacation destination. Basically run once and discard after importing. After coming home and logging finds, I normally purge the remaining caches from that PQ from GSAK. Hopefully this has sufficient appeal to be considered in a future update. BB |
I'd like to see this as well, but here is my work around...
In the PQ load settings, have it set the UserFlag on the newly imported caches and then run this code... (someone else here wrote it, so I can't take credit for any of it) Don't forget to reate a CustomField named "PQName"
CODE |
$file = $_Appdata + "\gsak.db3" $status = Sqlite("open",$file) $_sql = "select Description from LoadHistory order by rowid desc limit 1" $lastrow = Sqlite("sql","$_sql") $status = Sqlite("close",$file) $_sql="SELECT Code from Caches WHERE UserFlag" $FoundData=Sqlite("sql",$_sql) $FoundData=Replace(",","",$FoundData) $FoundData="'" + Replace($_CrLf,"','",$FoundData) + "'" $_sql="Update Custom SET PQName = '$lastrow' Where cCode IN ($FoundData)" $Data=Sqlite("sql",$_sql) Userflag Type=Clear Range=All |
-TWT