We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
Tags:
create new tag
, view all tags

Question

I have created a form for statuses. It contains fields such Status.Team, Status.User, Status.date. It works fine.

I want to create a view via formatted search to retrieve thenm based on Team and Date criteria. Searching on one field works fine using:

"%SEARCH{"Team.*?value=\"%URLPARAM{ChosenTeam}%\"" scope="text" regex="on" nosearch="on" casesensitive="on" format="| [[$topic]] | $formfield(Status.User) | $formfield(Status.Egt) | $formfield(Status.WeekEndingDate) | $summary |"}%"

or the other

"%SEARCH{"WeekEndingDate.*?value=\"%URLPARAM{ChosenWeekEndingDate}%\"" scope="text" regex="on" nosearch="on" casesensitive="on" format="| [[$topic]] | $formfield(Status.User) | $formfield(Status.Egt) | $formfield(Status.WeekEndingDate) | $summary |"}%"

But how can I search on both?

I am sure its simple but it has eluded me.

Thanks

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, Spreadsheet, table, BugzillaLink? , Smiles, Interwiki
Server OS: linux 2.2.18
Web server: Apache
Perl version: 5.005_03
Client OS: Win XP
Web Browser: IE 6.02

-- RandyMoran - 22 Aug 2003

Answer

Use the ; (and) operator in your regular expression. For example:

%SEARCH{ "FIELD\{name\=.*FeatureTopicClassification;name\=.*SoftwareProject.*value\=.*ProDebug" casesensitive="on"

looks for FeatureTopicClassification on any line and SoftwareProject on another line.

Note that the and operator was added in the TWikiRelease01Feb2003 release.

-- MartyBacke - 22 Aug 2003


Topic revision: r2 - 22 Aug 2003 - 17:51:00 - MartyBacke
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback