[EMAIL PROTECTED] wrote: > On an inline query, is it possible to create a condition that if a > number (say a program was running from 1 - 13) and answers are returned > for say all but 11, to instead replace 11 with a bar
Let me rephrase that. Your query returns a RaceNo number property which you sort on. It happens that in your results table this number will usually go 1, 2, 3, 4, ... and you want to display a bar when there's a discontinuity in this number between two rows. A SMW query selects a set of pages matching a criteria and returns their properties, so this analysis of the results affecting the display is outside what the SMW code does. You could try to hack the SMW query PHP code to add "check for discontinuity" and somehow specify the columns you want to check, but it doesn't seem easy. > So, in the query template, can I make it so that if say n1 is not equal > to n0 + 1, then to insert the bar? Maybe. Use format=template so that your template is called to print each row of the table. In your template do the discontinuity check (using Extension:ParserFunctions' #ifexpr: ) against a variable previousRaceNum and if so display your bar, then update previousRaceNum. MediaWiki doesn't let you set variables, but it sounds like http://www.mediawiki.org/wiki/Extension:VariablesExtension lets you do {{#vardefine: previousRaceNum | {{{1}}} }} . I've not used it. Denny sent e-mail about "New functions: Set and Declare" in September, you might be able to use these features to set your previousRaceNum but that doesn't seem like their intent. -- =S Page ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Semediawiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
