Tags:
create new tag
view all tags

Question

Hi,

I would like to be able to expand the members of a group for use as a select field within a form (or table). I have had some success with getting the search to work but I cannot incorporate this into a form as I would wish. I have tried everything I know but I'm stuck.. Could someone be able to tell me what I'm doing wrong?

This is what I would like to do:

<form>
<select name="topic">
<option value="%TOPIC%">Select...</option>
%SEARCH{"GROUP" web="Main" topic="SomeGroup" casesensitive="on" nonoise="on"
format="$pattern(.*Set GROUP =([^\n]*).*)$n " seperator=","}%
</select>
<input type="submit"  value="Choose" />
</form>

I'm aware I need to set the form to

format="<option value=\"$web.$topic\">$topic</option>"

Is there a way I could feed one search into the other to get this information?

This search does work:

%SEARCH{"GROUP" web="Main" topic="SomeGroup" casesensitive="on" nonoise="on"
format="$pattern(.*Set GROUP =([^\n]*).*)$n " seperator=","}%

What am I missing?

Thanks in advance.

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat Enterprise 4u4
Web server: Apache
Perl version: 5.8
Client OS: Windows
Web Browser: IE, Firefox
Categories: Search

-- PadraigLennon - 29 Aug 2008

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.

You need to SEARCH for the members, then format each member. You can do that with a SEARCH and a delayed CALC inside the format of the SEARCH. Here is a live example using the TWikiAdminGroup:

View the raw topic to see how this works.

-- PeterThoeny - 30 Aug 2008

Thanks a lot Peter.. That has saved me a nightmare in administration

-- PadraigLennon - 30 Aug 2008

Change status to:
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2008-08-30 - PadraigLennon
 
  • 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.