Eric,

That's great advice. The reason why I used Macro is that I can call
some API to return needed value dynamically (see complete code). I
don't know whether Tiddlywiki Macros can return values or not. But
even if it can, I guess I still need to code the logic of return
values in a macro first.

Yang



modifier: yang
created:
modified: 20100708000000
type: None
tags: systemConfig excludeLists excludeSearch


config.macros.BeforeIStart ={

    handler: function(place, macroName, params, wikifier, paramString,
tiddler){

                var activeJobId =
config.macros.DatabaseAccess.getActiveJobIdByEngineerName(jobForm,
userName);

                var jobNoTiddler = "wikiinthefield_job_" + activeJobId + 
"_jobNo";
                var customerAddressTiddler = "wikiinthefield_job_" + 
activeJobId +
"_customerAddress";
                var customerPhone = "wikiinthefield_job_" + activeJobId +
"_customerPhone";

                var out = '!Your current job \n';
                out += "<<tabs txtMoreTab \"job no\" \"job no\" " + 
jobNoTiddler + "
\"customer address\" \"customer address\" " + customerAddressTiddler +
" \"customer phone\" \"customer phone\" " + customerPhone + ">>";

                wikify(out, place);

    }

}

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to