• 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

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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:
    _SID-00510.jpg

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:
    _SID-00510_2.jpg

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

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

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

Checkins

TargetRelease n/a
ReleasedIn

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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback