• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6752: CALC does not work inside a GLUEd SEARCH

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension SpreadSheetPlugin Low No Action Required   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


I have a SpreadSheet calculation embedded in a formatted SEARCH that uses GLUE.

I tried to do this:

%~~ SEARCH{"
*~~ META:FORM{name=\"StandardsForm\"" nonoise="on" 
~~~ format="|$topic| $formfield(StandardName) | $formfield(DateAccepted) |
~~~  $percntCALC{ $IF( $TIME($formfield(DateAccepted)) > $TIMEADD($TIME(), -2, month), $percntN$percnt, ) }$percnt |
~~~ "  }%

and it prints the complete =%CALC{ $IF{ ...}%" string as a literal string in the results.

  • screenshot:

If, instead, I do this:

%SEARCH{"META:FORM{name=\"StandardsForm\"" nonoise="on" 
  format="|$topic| $formfield(StandardName) | $formfield(DateAccepted) | $percntCALC{ $IF( $TIME($formfield(DateAccepted)) > $TIMEADD($TIME(), -2, month), $percntN$percnt, ) }$percnt |"  }%

i.e., no glue, the %CALC{...}% function is evaluated as expected

  • screenshot:

The order as showm by %PLUGINDESCRIPTIONS% is

  • GluePlugin
  • SpreadSheetPlugin

which., I would have thought, would mean Glue is evaluated first. But perhaps I'm mistaken.,

Do we have an ordering problem? Can we fix it? My real search is much larger and longer than the snippet shown here; I'd like to use Glue but I need to include the calculation(s).

-- TWiki:Main/VickiBrown - 2011-06-15

I am setting this to low priority, the GluePlugin is not very common.

You could hire one of the TWiki:Codev.TWikiConsultants to investigate.

-- TWiki:Main.PeterThoeny - 2011-06-16

I am setting this to "no action required" - this is an old request. I do not intend to make the CALC work with glue. BTW, you can use a SEARCH with type="query" and have the search query span multiple lines.

-- TWiki:Main.PeterThoeny - 2013-10-18

Summary CALC does not work inside a GLUEd SEARCH
ReportedBy TWiki:Main.VickiBrown

SVN Range TWiki-5.1.0-trunk, Mon, 13 Jun 2011, build 21497
AppliesTo Extension
Component SpreadSheetPlugin
Priority Low
CurrentState No Action Required


TargetRelease n/a

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2013-10-18 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback