You are here: Foswiki>Tasks Web>Item8417 (05 Jul 2015, GeorgeClark)Edit Attach

Item8417: When using CALC in search, CALC in format will not be executed

pencil
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Extension
Component: SpreadSheetPlugin
Branches: trunk
Reported By: RalfKrueger
Waiting For:
Last Change By: GeorgeClark
When using %CALC% in the search-parameter of a =%SEARCH% macro, =%CALC%=-expressions in the format-parameter doesn't work.

Search with a constant work fine

%SEARCH{
   search="Item8417"
   type="word"
   scope="topic"
   format="| $topic | $createdate | $percntCALC{$FORMATTIME($TIME($createdate),$day.$mo.$year)}$percnt |"
}%

...produces...

Searched: Item8417
Item8417 24 Jan 2010 - 14:40 24.01.2010
Number of topics: 1

Search with CALC will not execute CALC in format-paramter

%CALC{$SET(S0,Item8417)}%
%SEARCH{
   search="%CALC{$GET(S0)}%"
   type="word"
   scope="topic"
   format="| $topic | $createdate | $percntCALC{$FORMATTIME($TIME($createdate),$day.$mo.$year)}$percnt |"
}%

...produces...

Searched: Item8417
Item8417 24 Jan 2010 - 14:40 %CALC{$FORMATTIME($TIME(24 Jan 2010 - 14:40),$day.$mo.$year)}%
Number of topics: 1

If it works here, please have a look at the hardcopy.

-- RalfKrueger - 24 Jan 2010

SSP is pretty much a law unto itself; i can't hope to write out the rules by which it barely works. However, I have experienced this particular bug, and find it very irritating myself.

Confirmed.

-- CrawfordCurrie - 27 Jun 2010

I think the new in-macro-order CALCULATE (in 1.2.0) will resolve this from 1.2.0 onwards.

-- SvenDowideit - 05 Nov 2012
 

ItemTemplate edit

Summary When using CALC in search, CALC in format will not be executed
ReportedBy RalfKrueger
Codebase 1.1.5, 1.0.8, trunk
SVN Range
AppliesTo Extension
Component SpreadSheetPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:b85c0c0f68d6
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches trunk
trunkCheckins distro:b85c0c0f68d6
Release01x01Checkins
I Attachment Action Size Date Who Comment
hardcopy.pngpng hardcopy.png manage 18 K 24 Jan 2010 - 14:38 RalfKrueger Hardcopy
Topic revision: r5 - 05 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy