Tags:
create new tag
view all tags

Question

I'm trying to maintain an edittable in which the first column is a topic name, and the second column is a field of that topic name, pulled with $FORMFIELD{}%. This means that I need to use :

%CALC{"$T(R$ROW():C1)"}%

In the topic="" parameter of my $FORMFIELD{} expression, and then I need to use this generic pattern as a label in the edittable format to reproduce this for every new row.

I've struggled with this for ages now - is there any way to get this to escape properly ? Is there a simpler way to achieve this ?

My goal is to use edittable to change the topic in first column, and to have the second column automatically update with a value of the form attached to the topic I've just set in column 1.

Thanks for any advice.

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RHEL3.0
Web server: Apache 1.3
Perl version: 5.6.0
Client OS: XP
Web Browser: Firefox 1.5.1
Categories: Forms, Plugins

-- SteveJonesST - 23 Mar 2006

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.

I have not tried, but something like this should work: %CALC{"$NOP(%)FORMFIELD{\"Foo\" topic=\"$T(R$ROW():C1)\"}$NOP(%)"}%. The trick is to delay the FORMFIELD evaluation.

-- PeterThoeny - 23 Mar 2006

Hi Peter,

I really appreciate your time. I can see what you're saying - we need to process CALC before FORMFIELD, but I can't get your idea to work on my testcase, having tried many variations on your helpful suggestion. The two lines in this table should read the same when I get it right :

Topic Name Support Status
UseCalcInTopicName AnsweredQuestions
UseCalcInTopicName AnsweredQuestions

Any further advice is welcome.

-- SteveJonesST - 24 Mar 2006

You need to trim the whitespace, a topic=" UseCalcInTopicName " does not exist. I fixed above example.

-- PeterThoeny - 24 Mar 2006

Thanks. This is exactly what I needed. I appreciate your help very much.

-- SteveJonesST - 27 Mar 2006

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2006-03-27 - SteveJonesST
 
  • 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.