Dear Community,

is there a way to maintain the order of attribute values, e.g. in ASK queries. By "maintain" I mean to keep the order of the values as they had been added in the wiki page's annotations.

Currently I get this:

Test_Page contains:

   [[MyProperty::Page1]]
   [[MyProperty::Page2]]
   [[MyProperty::Page3]]

Another_Page contains this query:

   {{#ask: [[Test_Page]] | ?MyProperty | format = ul }}

and shows this result

   Test_Page (MyProperty: Page1, Page2, Page3)

Changing the order in Test_Page to:

   [[MyProperty::Page2]]
   [[MyProperty::Page3]]
   [[MyProperty::Page1]]

still results in exactly the same query result, i.e. Page1 at the beginnig of the list.

Is there a way to accomplish what I want in Wiki text?

If there is a way to accomplish this in PHP that is also fine for me. I investigated a bit already and found, that

   $data = StoreFactory::getStore()->getSemanticData( $myPage );
   $values = $data->getPropertyValues( $myProperty );

already returns the values in a constant order (page-IDs?). Is the DB maybe not prepared to maintain this information?

BTW. I am using MW1.31 and SMW3.0.2.

THX,
  michael


--

Dr. Michael Erdmann         | erdm...@diqa-pm.com   | +49 151 6140 1790
DIQA Projektmanagement GmbH | An der RaumFabrik 33c |   76227 Karlsruhe
Handelsregister: Amtsgericht Mannheim HRB 715454 USt-IdNr.: DE283037270
Geschäftsführer: Dr. Michael Erdmann, Dipl.-Wirtsch.-Inf. Daniel Hansch

This email may contain confidential information. If you are not the intended recipient please notify the sender immediately and delete this email. Any unauthorized copying, disclosure or distribution of this email is strictly forbidden.
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to