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
--
MartinJrAdane - 31 Jul 2006
Answer
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