From: Alex K. <ak...@cr...> - 2010-08-16 17:02:25
|
An alternative solution would be to put multiple #ask queries inside of the #if parser, e.g. {{#if: {{{revenue|}}}|{{#ask: query if revenue}}|{{#ask: query if no revenue}}}}. AK On Mon, Aug 16, 2010 at 9:59 AM, John Arrowwood <Jo...@ir...> wrote: > It works fine for me. Here is an actual template: > > {{#ask: > [[Category:Team.Scrum.Updates]] > {{#if: {{{team|}}} | [[(team)::{{{team}}}]] }} > {{#if: {{{date|}}} | [[(date)::{{{date}}}]] }} > | format=table > | mainlabel=- > ... > | limit = {{{limit|5}}} > | sort = (date) > | order = descending > }} > > On Mon, Aug 16, 2010 at 12:29 PM, Edward Swing <de...@vs...> > wrote: > > > I am trying to create a template for building queries. So I am interested > > in nesting #if statements inside an #ask. For example: > > > > > > > > {{#ask: [[Category: Company]] {{#if: {{{revenue|}}} | [[revenue:: > > >{{{revenue}}}]] }} > > > > }} > > > > > > > > This should list all companies in the wiki with a revenue over the value > > passed in (if it is set), or all companies (if it is not set). The > revenue > > clause is one of several that I am trying to link together (e.g., query > > revenue + another property, each of which is optional). > > > > > > > > Does this work? If so, how? I am not getting it to work on my wiki yet. > > > > > > > > Edward Swing > > Principal Technology Consultant > > Vision Systems & Technology, Inc. > > > > ________________________________ > > > > > > > > 6021 University Boulevard, Suite 360 ▪ Ellicott City ▪ Maryland ▪ 21043 > > > > Tel: 410.418.9919 ▪ Main: 410.418.5555 ▪ Fax: 410.418.8580 > > > > Email: de...@vs... > > Web: http://www.vsticorp.com/ <http://www.vsticorp.com/> > > > > > > > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by > > > > Make an app they can't live without > > Enter the BlackBerry Developer Challenge > > http://p.sf.net/sfu/RIM-dev2dev > > _______________________________________________ > > Semediawiki-user mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > > > > -- > John Arrowwood > John (at) Irie (dash) Inc (dot) com > John (at) Arrowwood Photography (dot) com > John (at) Hanlons Razor (dot) com > -- > http://www.irie-inc.com/ > http://arrowwood.blogspot.com/ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- Alex Kozak Program Assistant Creative Commons |