Discuss Special property "Allows value"

From semantic-mediawiki.org

Individual sortorder[edit]

Is there any way which allows me the make my own sortorder for attributes without making the attribute values .. clumsy?

Example: attribute "rank" with these possible values: Captain, Lieutenant, Sergeant, Ensign

Now i can make values like "1 - Ensign", "2 - Sergeant" but these numbers are always visible and have to be used to assign the rank.

Is there a better way to solve this?

Regards

--193.247.250.13 18:20, 22 December 2010 (CET)

Hi - I'm guessing that this might actually be a Semantic Forms question, but in any case, the answer is unfortunately no. Yaron Koren 19:59, 22 December 2010 (CET)

Non-allowed values[edit]

What happens when someone tries to use a value that is not allowed? Is it just not assigned? --171.159.194.11 21:10, 31 May 2011 (CEST)

Yes. Yaron Koren 02:32, 1 June 2011 (CEST)

adding multiple values[edit]

i have a properties that can take any or all of the allowed values, for instance Kansas City is in Missouri and Kansas my property in state [[Allows value::Kansas ]] [[Allows value::Missouri]] but when i add <nowiki>Kansas and Missouri <nowiki> with a form, i get a little caution triangle that says "Kansas, Missouri" not in list of allowable values. How do i avoid this?

Contents

Thread titleRepliesLast modified
Number of Allowed Values limitation ?217:56, 7 January 2015
Non-allowed values revisited116:58, 7 April 2014
Documentation updated018:40, 7 November 2012

Number of Allowed Values limitation ?

Hello, I try to create a (page or text) property with more than 150 different allowed entries. when I try with less than 101 allowed values the input tokens form works well (it proposes the allowed values) when I try with more values (102 !) it doesn't work any more ? Is there any possibily to increase the limitation of number of allowed values ?

thanks for answer

17:34, 6 January 2015

I found the solution myself using the setting of var sfgMaxLocalAutocompleteValues .

thanks.

18:17, 6 January 2015

`sfgMaxLocalAutocompleteValues` is a setting specific to SF (Semantic Forms) by default SMW does not limit the number of allowed values.

17:56, 7 January 2015
 
 

Non-allowed values revisited

As Yaron has remarked above, when a value is not allowed, it is simply not assigned.

The only hint that a user gets when he uses such a value is the warning sign assigning the value using [[Foo::bar]]. However, when using {{#set:Foo=bar}}, there is no feedback to the user. Or is there? Or should one implement that?

Otherwise, is it possible to get a list of pages that assign bad values or something like that? Like a special property "uses bad value" or the like? Or would it be possible/make sense to implement that? Already answering my own question: Property:Has improper value for. Still, what about adding an attribute to {{#set}} to allow outputting the warning sign in case of an error?

16:30, 7 April 2014

Furthermore, I have added some docs on the issue to the page. I hope this was a Good Idea (tm).

16:58, 7 April 2014
 

Documentation updated

This documentation was updated to reflect the current behaviour, especially concerning properties of type number (see bug 31336). Cheers

18:40, 7 November 2012