This question about Using an extension: Answered

Is it possible to extract table columns for values in data forms

I have a table with four columns and I want to use three (or two) of the columns as values in a data form with type select+multi+values. In a test topic I made an EXTRACT example that works but when inserting that into the values column of the data form definition the rendered form doesn't work. It seem to list all text in the referenced table topic (including META). Anyways it feels as this should be possible without too much hassle and preferably with DBCache data. Is there a way?

-- LarsEik - 05 Nov 2009

FilterPlugin's EXTRACT should handle that nicely. If you could please show us how you tried to implement it, we can proofread/troubleshoot it for you.

-- SeanMorgan - 05 Nov 2009

The problem was unexpected characters in the text, so rendering got screwed.

-- LarsEik - 08 Nov 2009

A little update. The problem was commas within the text used to display in the select box. That screwes up the format which is to be "Readable choice=$savedvalue". Here "Readable choice" actually was $formfield(Name) and $savedvalue would be the topic name because it is SomethingAUTOINC (like an index). The separator for data type select+values is comma, so when the "Readable choice" contains comma....blah. After knocking around I got it right with FilterPlugin, it just substitutes comma with nothing:

%<nop>DBQUERY{ "MyForm" separator=", " sort="Id" format="$formfield(Id) $percntSUBST{ text=\"$formfield(Name)\" pattern=\",\" }$percnt=$topic" }%

-- LarsEik - 09 Nov 2009

QuestionForm edit

Subject Using an extension
Extension FilterPlugin
Version Foswiki 1.0.7
Status Answered
Topic revision: r4 - 09 Nov 2009, LarsEik - This page was cached on 10 Jan 2018 - 17:51.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License