[GSAK] Macro Custom Fields


Para além do canivete suíço do geocaching, este espaço serve para discussão de outros aplicativos de gestão de bases de dados

Moderadores: hulkman, migueis

Avatar do Utilizador

Geopt Lackey
Geopt Lackey

Mensagens: 8700

Registado: quinta 09 dez 2010, 13:38

Mensagem Post: #1 a sexta 09 set 2011, 15:13 

[GSAK] Macro Custom Fields

Alguém sabe como numa macro atribuo um valor a um Custom Fields (novos campos na v8)?
Existem variáveis para os evocar? :?
Imagem Imagem Imagem
Avatar do Utilizador

Geopt Proud Member
Geopt Proud Member

Mensagens: 30152

Registado: domingo 25 abr 2010, 01:07

Localização: Lisboa

Mensagem Post: #2 a sexta 09 set 2011, 15:22 

Re: [GSAK] Macro Custom Fields

Não experimentei, mas no help temos

%custom_xxxxxx - Get the value of a custom field where xxxxx is the custom field name you want to use. This special tag can be used any place other special tags are used and should enable a quick and easy way to include custom information in many areas of GSAK.Without this special tag you would be restricted to using %macro or %mtag to fetch the corresponding information. Note: This special tag also supports the common format %Custom_xxxx=nn where nn is the first nn characters of the value of the custom field fetched.

%caches_xxxxxx - This special tag is very similar to the %custom_xxxxxxx special tag above but applies to the "Caches" table. Hence giving you access to all the database variables (in the "Caches" table) now and in the future. This tag should be used in preference to fetching the same information via the %macro= special tag as it is much faster.

Note: The special tag %des is provided for backwards compatibility only; use %name instead. Earlier versions of GSAK used the term "cache description" to mean "cache name". However, this caused confusion with the actual cache description. GSAK now uses the terms "cache name" and "cache description", consistent with their intended meanings. Therefore, the special tag for the cache name has been changed to the more mnemonic %name. Although %des still expands to the cache name at this time, there is no guarantee that this will always be the case. You are strongly recommended to use %name in all new applications.
Imagem Imagem
Avatar do Utilizador

Geopt Lackey
Geopt Lackey

Mensagens: 8700

Registado: quinta 09 dez 2010, 13:38

Mensagem Post: #3 a sexta 09 set 2011, 15:47 

Re: [GSAK] Macro Custom Fields

Mas isso dá para usar o "%custom_xxxxxx" nas macros?? :? Normalmente dá apenas para outros campos do Gsak...
Por enquanto a única forma que encontrei é assim:
$result = sqlite("sql","update custom set <custom_field_name> = 'some data' where ccode = " + sqlquote($d_code))

Se alguém souber uma melhor...
Imagem Imagem Imagem

Voltar para GSAK

Quem está ligado:

Utilizador a ver este Fórum: Nenhum utilizador registado e 1 visitante

cron
Powered by PHPBB - Geopt.org 2013