Tags:
create new tag
view all tags

Question

I looked over the page for IfStatements but don't see what I was hoping to find.

Is there a way to say

   If (exists SomeTopic) then
     do something, e.g. INCLUDE it or TOC or show a link...
  else
     something else

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Missing functionality

-- VickiBrown - 11 Apr 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

It should be possible to do the IfStatements with a VarIF.

Alternatively, use the SpreadSheetPlugin formula. For example:
%CALC{$IF($EXISTS(WeeklyReport), $NOP(%)INCLUDE{WeeklyReport}$NOP(%), Weekly report is currently not available)}%

-- PeterThoeny - 13 Apr 2007

You cannot use IF for this.

-- ArthurClemens - 13 Apr 2007

see bug report 3889

-- VickiBrown - 13 Apr 2007

This is fixed now. Specify a full $EXISTS(Web.Topic), or upgrade to the latest SpreadSheetPlugin.

-- PeterThoeny - 15 Apr 2007

Change status to:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-04-23 - VickiBrown
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.