Question
Is there a way to have the
select field in an EditTable retrieve values from some table on another topic (as opposed to simply supplying the field with a list of values?).
Environment
--
EyalTeutsch - 28 Nov 2007
Answer
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.
Use an (parametrized) INCLUDE which contains a SEARCH.
--
FranzJosefGigler - 28 Nov 2007
Thanks - so now it's down to the regular expression details which for some reason I'm unable to produce.
I was thinking that the the following should fetch all rows that start with a
|M from
EditTableSelectedValuesFromTopic1, and was hoping to get
only the text inside the "=|=" (without any details on the topic found which I seem to be getting):
%SEARCH{"^\|M" scope="text" type="regex" web="Sandbox" topic="EditTableSelectedValuesFromTopic1" nosummary="on" nosearch="on" noheader="on" multiple="on" nototal="on" format=$pattern(^\|.*\|$)}%
--
EyalTeutsch- 29 Nov 2007
Ok - got it - was missing in the inner parentheses in the
$pattern:
%SEARCH{"^\|M" scope="text" type="regex" web="Sandbox" topic="EditTableSelectedValuesFromTopic1" nosummary="on" nosearch="on" noheader="on" multiple="on" nototal="on" format="$pattern(^\|(.*?)\|.*)<br/>" }%
FranzJosefGigler
EyalTeutsch
--
EyalTeutsch - 03 Dec 2007
Did know you would get it.
--
FranzJosefGigler - 03 Dec 2007
I tried to setup EDITTABLE with a
select field as described above - but failed miserably. Could someone please spell it out for me? Do I have to escape all the quotes and percent signs?
--
MartinKaufmann - 06 Dec 2007
I actually settled at the end to use predefined values. Not sure too, as to how one would take the above search pattern and implement it in a
select field.
--
EyalTeutsch - 06 Dec 2007
%STARTSECTION{"mysearch"}%%SEARCH{"^\|M" scope="text" type="regex" web="Sandbox" topic="EditTableSelectedValuesFromTopic1" nosummary="on" nosearch="on" noheader="on" multiple="on" nototal="on" format="$pattern(^\|(.*?)\|.*)" separator="," }%%ENDSECTION{"mysearch"}%
--
FranzJosefGigler - 06 Dec 2007
Thanks for your help! I got it working now. Just one more question: Is it necessary to use the
%INCLUDE% trick or does it work without as well?
--
MartinKaufmann - 07 Dec 2007
Should work without it as well, the include trick makes it just more ledgible.
--
FranzJosefGigler - 07 Dec 2007
thx Josef, now I see the light -:)
--
EyalTeutsch - 10 Dec 2007