Hi Yaron! My example is surely very silly and synthetic so let's just forget about the flowers I'll try to explain the real problem I faced with in a Foresight wiki.
Here is my problem domain. There are several brainstorming sessions about the forecasts on a distant future, all of them have different topics. Each of those sessions has various objects as the results of the brainstorming: future trends, possible technologies that may appear in the future, possible important events. All these data are loaded to the wiki using the semantic forms. After the brainstorming ends, the participants can improve the objects, categorize them and link them together. Here for example I have the Trend objects. I want to connect Trends to the Events and to Technologies but only inside the current brainstorming session. The semantic form for Trend will look like that: <FORM>... {{{field|session name|hidden|required}}} // the only valid way to create a trend is using the #formlink on a Session's page. Formlink will fill this value with the name of the session {{{field|related events|values from query=[[Category::Event]][[session::$1]]|substitute=Trend[session name] | input type=two listboxes}}} {{{field|related technologies|values from query=[[Category::Technology]][[session::$1]]|substitute=Trend[session name] | input type=two listboxes}}} ... <END OF FORM> I can use values from concept but it's a very bad workaround if I have many sessions. I hope now the case is more clear. ----- Yury Katkov On Sun, Sep 30, 2012 at 6:22 PM, Yaron Koren <ya...@wikiworks.com> wrote: > Hi Yury, > > Well, you bring up two proposed features for SF here: a standard "values > from query" parameter (which you submitted a patch for), and the ability to > include variables, representing the current content of some other form > field, in the field tag - which could go into a "values from query" > parameter, but it wouldn't necessarily have to. I'll just focus on the > second one here. > > This is a complex need, and one that I think is out of the ordinary: you > want users to select a genus, and a color, and then only flowers that match > those two fields, and additionally have an owner specified for them, will > show up in a listbox. > > My main question is, what sort of page is this form meant to edit? Is it a > page about a collection of flowers that all share one genus and color? I > don't know if this an actual form you're talking about, or just a metaphor > for a form that holds more technical data that's harder to explain, but in > either case it seems odd. Basically you're talking about creating a subset > of a subset - a group of pages that match both solid criteria (the color and > the genus) and arbitrary criteria (the user's choice). I haven't heard of > that kind of use case - but maybe it makes sense for the circumstances. > Could you explain the data structure of this form in more detail? > > -Yaron > > On Sat, Sep 29, 2012 at 8:38 PM, Yury Katkov <katkov.ju...@gmail.com> wrote: >> >> Hi James! >> >> Example 3 in the documentationlooks very much like my case, thank you >> so much!!! I'll try >> it tomorrow, maybe it will suit me as a temporary decision. I don't >> think that it uses ResourceLoader and am not sure that it is >> compatible with the latest versions of MW/SMF/SF. >> >> It also seems Jason Zhang can only use one value to substitute instead >> of @@@@, is that right? >> >> Anyway the existence of such extensions shows that more than me alone >> need such a feature. Also I'll look at your AJAX calls and hopefully >> will be able to answer to a question (1) to developers. >> >> The question (2) to developers remains and also I'm open to discussion >> about the syntax. >> >> Cheers, >> Yury >> >> >> On Sun, Sep 30, 2012 at 4:22 AM, James HK <jamesin.hongkon...@gmail.com> >> wrote: >> > Hi, >> > >> > See [1] which is an extension that generates option values from a >> > semantic query or parser function for a specified form field. >> > >> > [1] >> > http://www.mediawiki.org/wiki/Extension:SemanticFormsSelect#Query_And_Function_format >> > >> > Cheers >> > >> > On 9/30/12, Yury Katkov <katkov.ju...@gmail.com> wrote: >> >> Hi everyone! >> >> >> >> I think I need something like 'values dependent on' but a little bit >> >> more >> >> powerful for my Forms. >> >> I've recently added 'values from query' parameter for the field tag in >> >> Semantic Forms (maybe it will be approved), see here for the details >> >> [1] >> >> >> >> What I need is the ability to create the fields like this one: >> >> >> >> {{field|values from >> >> >> >> query=[[Category:$1]][[Color::$2]][[Owner::+]]|substitute=Flowers[Genus],Flowers[Color]|input >> >> type=listbox}} >> >> >> >> This listbox will show the following list of possible values: >> >> 1) the possible values will be the names of the wikipages >> >> 2) all these wikipages will have an Owner property >> >> 3) there will be belong to a category that is stored in a field Genus >> >> of >> >> the template Flowers >> >> 4) there will have the property Color and the color will be store in a >> >> field called Color >> >> >> >> My question to the users of SMW: Is anybody interested in such a >> >> feature? >> >> My questions to SMW\SF developers: >> >> 1) is it possible to make semantic queries on the fly using AJAX+SMWAsk >> >> API? >> >> 2) Our project really needs such a feature. If we program here, is it >> >> likely to be merged with the core of Semantic Forms? >> >> >> >> >> >> [1] https://bugzilla.wikimedia.org/show_bug.cgi?id=40629 >> >> ----- >> >> Yury Katkov >> >> >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://ad.doubleclick.net/clk;258768047;13503038;j? >> http://info.appdynamics.com/FreeJavaPerformanceDownload.html >> _______________________________________________ >> Semediawiki-user mailing list >> semediawiki-u...@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > > > -- > WikiWorks · MediaWiki Consulting · http://wikiworks.com ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel