Question
Hi all,
I'm not sure if what I'm trying to do is possible. I've tried to search the net some time and haven't found a solution, so here is what I'm trying to do.
Specifically, I have a table that represents the budget in my group. I've used
EditTablePlugin to allow nice editing on the fly. The first field is Name, which represents the owner of the expense. I've tried to create an embedded SEARCH that retrieves all users and then use this as a select in the
EditTable column. This appears to work until I hit EditTable button, then the resullting HTML is quite messed up and I see exposed implementation details etc.
Maybe I've done this completely wrong? Or is this a bug? I've copied the code below and simplified it a little
* Set BALANCE = $EVAL( ($VALUE($T(R$ROW(-1):C$COLUMN())) ) + ($VALUE($T(R$ROW():C$COLUMN(+2))) * 1.5 ) + ($VALUE($T(R$ROW():C$COLUMN(+3))) * 0.25 ) + ($VALUE($T(R$ROW():C$COLUMN(+4))) * 0.17 ) )
* Set USERLIST = %SEARCH{"%META:FORM.*[U]serForm" web="Main" nosearch="on" type="regex" format=",$topic" }%
Environment
--
AaronCoday - 03 Jan 2008
Answer
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.
What do you get if you use the USERLIST variable by itself on the page somewhere?
--
MatthewCardozo - 04 Jan 2008
Hi,
When the above is rendered:
- Set USERLIST = AaronCoday,
ChrisDahnken
Exactly.
When I just use %USERLIST%
,AaronCoday ,ChrisDahnken
And a newline.
Aaron
--
AaronCoday - 09 Jan 2008
You need to suppress newlines in the SEARCH output:
format="$topic" separator=", ". See details in
VarSEARCH.
--
PeterThoeny - 09 Jan 2008
Thanks for the pointer, I had also been doing a couple of things wrong. In the end what I used for the
EditTable line is:
%EDITTABLE{ format="| select, 1, %USERLIST% | text | label | label | text | text | text | " }%
I needed to use "%" instead of the escaped $percnt.
and
* Set USERLIST = %SEARCH{"%META:FORM.*[U]serForm" web="Main" nosearch="on" nonoise="on" separator=", " type="regex" format="$topic" }%
Here adding the separator and nonoise made the difference.
Thanks
--
AaronCoday - 10 Jan 2008
Moving it to answered now.
--
AaronCoday - 10 Jan 2008