From: Cavila C. <con...@ho...> - 2013-08-15 19:35:46
|
FWIW - whenever I organise subobjects in a template, I tend to reserve one property for automatically numbering the subobjects in the order in which they appear on the page. I don't use NumerAlpha, but just a combination of the parser functions #var / #vardefine and #expr. When any items are inserted or rearranged and the page is saved, the property values will be updated accordingly. If I recall correctly, there is a description of this approach on the SMW community wiki. Cav > From: ral...@kr... > To: sem...@li... > Date: Thu, 15 Aug 2013 15:36:08 +0200 > Subject: [Semediawiki-user] SF: Sort a #ask query output by the order the items are arranged in the form editor? > > Hello together, > > I have a question about sorting a query of subobjects made by #ask, which have > been added by a form associated with a multiple-instance template - stored as > subobjects. > > Question: How can I sort the query output in order to sort exactly the way the > objects have been manually arranged in the form? > > Of course, I can sort by a property, which works. But if people rearrange the > items in the form they expect that the query result is how they arranged it. > > If I just remove any sort from the query, the result is undetermined (maybe > since the subobjects use random names?). > > Multiple-instance template like: > > {{#subobject: > |PropDefinition={{{Definition|}}} > |PropField2={{{Field2|}}} > }} > > Query in main template like: > > {{#ask: [[-Has subobject::{{FULLPAGENAME}}]][[Definition::+]] > |?PropDefinition=Definition > |?PropField2=Field2 > |format=table > |mainlabel=- > <!--|sort=Definition--> > }} > > So how to sort the output by the order the items have been arranged by the > editors in the form? > Is this even possible by a sort? If not, what is the purpose of the rearrange > functionality in the form? > > Cheers > Ralf > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user |