Tags:
create new tag
view all tags

Question

Hi to all!!! Im new to twiki and i need your help. Hope there will be any takers on this. I have a form added to a topic template. This form has two fields, DateResolved and CurrentState. Default value for CurrentState is BugUnderInvestigation. When the CurrentState value is changed to BugResolved, the DateResolved field gets the current Date value by this code: %CALC{"$IF($EXACT(,BugResolved),31 Jul 2006,)"}%. When the topic is previewed and saved, the field values are correct, putting emphasis on the DateResolved field. Then i have another topic called ShowBugReports which lists all submitted reports in a table through a SEARCH command. The problem is that in my search command, i couldnt get the date value in the DateResolved field using any of the following ways: $formfield, %FORMFIELD% and %META{"formfield"}%. Instead, the search command returns the ff: $IF($EXACT(%META{"formfield,BugResolved),31 Jul 2006,)"}%. What I want is for the search command to return the actual date. Thanks to any takers!

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Forms

-- MartinJrAdane - 31 Jul 2006

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.

The code i was talking about above was removed. Don't know why..but here it is: %CALC{"$IF($EXACT(,BugResolved),31 Jul 2006,)"}%

-- MartinJrAdane - 31 Jul 2006

$percntCALC{$quot$IF($EXACT($percntMETA{$quotformfield$quot name=$quotCurrentState$quot}$percnt,BugResolved),$percntDATE$percnt,)$quot}$percnt

-- MartinJrAdane - 31 Jul 2006

I am not sure this is possible in this form. Here is another way: Treat the DateResolved and CurrentState fields independently. That is, DateResolved just contains a date (or is empty). In the bug report pages you can include a header that shows the summary of the bug topic; there you can do the conditional display of the date field.

You can do the same conditional in the SEARCH of ShowBugReports. Untested example for the date: format=".... | $perntCALC{$IF($EXACT($formfield(CurrentState), BugResolved), $formfield(DateResolve),)}$pernt | etc..."

-- PeterThoeny - 01 Sep 2006

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2006-09-01 - PeterThoeny
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.