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

Hi,

I do a search based on a form and retrieve the formfields into a table.

I'd like to use one of the formfields in an external link showing up in the result table, where the formfield is actually a value in the external URL.

Something like:

%TABLE{ footerrows="1" }%
| *Name*|
%SEARCH{ ".[M]ETA.FORM.name=.*GtBbNewApplicantForm."  casesensitive="on" regex="on" nototal="on" nosearch="on" order="modified" reverse="on" multiple="on" format="|[[http://directory.com/query.cgi?alias=$formfield(LdapName)][%ICON{person}%]]   | 

Is there any way to get this work? I tried to escape some of the characters and also tried a

 <ahref....>fdf</a> 
statement bu that did not work either.

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux RH3
Web server: Apache 1.3
Perl version: 5.8.6
Client OS: XP
Web Browser: Opera, Mozilla, IE
Categories: Forms, Search

-- KaiMoorfeld - 12 Jul 2007

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

The form field isn't the problem. TWiki gets confused by the quotes which are expanded by %ICON{person}%, they destroy the parsing of your format attribute. The character you need to escape is the percent character of that tag: $percntICON{person}$percnt. Let me demonstrate with the SupportStatus field of this topic's WebForm, using TWiki's own search as external URL (I restrict the search to the current topic, for obvious reasons):

%TABLE{ footerrows="1" }%
| *Name* |
%SEARCH{ ".[M]ETA.FORM.name=.*Form."  casesensitive="on" regex="on" nototal="on" nosearch="on" order="modified" reverse="on" multiple="on" topic="%TOPIC%" format="|[[%SCRIPTURL{view}%/%WEB%/WebSearch?search=$formfield(SupportStatus)][$percntICON{person}$percnt]]|"}% 

Name
person

-- HaraldJoerg - 12 Jul 2007

 
Change status to:
Topic revision: r2 - 12 Jul 2007 - 13:51:49 - HaraldJoerg
 
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