Line: 1 to 1 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||
Line: 140 to 140 | ||||||||||||||||||||||
| ||||||||||||||||||||||
Added: | ||||||||||||||||||||||
> > | Search with conditional outputA regular expression search is flexible, but there are limitations. For example, you cannot show all topics that are up to exactly one week old, or create a report that shows all records with invalid form fields or fields within a certain range, etc. You need some additional logic to format output based on a condition:
%CALC{$SET(weekold, $TIMEADD($TIME(), -7, day))}% %SEARCH{ "." scope="topic" regex="on" nosearch="on" nototal="on" order="modified" reverse="on" format="$percntCALC{$IF($TIME($date) < $GET(weekold), <nop>, | [[$topic]] | $wikiusername | $date | $rev |)}$percnt" limit="100" }%
| |||||||||||||||||||||
Embedding search forms to return a formatted resultUse an HTML form and an embedded formatted search on the same topic. You can link them together with an%URLPARAM{"..."}% variable. Example: |