Property talk:Allows value

Jump to: navigation, search

[edit] Get all category content into a select box

How would I retrieve a list of all the articles/categories in a category for reference in an enumeration select box? -Eep² 03:51, 23 July 2007 (CEST)

I don't think you could do this with an Enumeration; Enumerations have hard-coded values. Yaron Koren 19:53, 2 August 2007 (CEST)
Enumeration values aren't hard-coded; they're determined by what's on a wiki page defined with specific syntax, so it would just be a matter of outputting all articles in a category in the right syntax. DPL may be able to do this but it would be more convienent if SMW had this functionality built-in... -Eep² 06:40, 3 August 2007 (CEST)
Yeah, that's what I mean, hard-coded on the wiki page. Though I don't know what you mean by adding this functionality to SMW; SMW doesn't do data input, so they don't make "select boxes" and the like; that's the job for Semantic Forms or another extension. Yaron Koren 21:57, 3 August 2007 (CEST)
Yea, well, I asked about getting select listboxes in Semantic Forms and you basically gave me the cold shoulder, so... -Eep² 23:19, 3 August 2007 (CEST)

[edit] Multiple attributes

It would be nice if this could be specified for multple values without having to repeat the [[allows value:=..]] markup all the time. Something like: [[allows value:=value1,value2,value3]] with a configurable separator in case a comma (,) is already used in the value's name (for whatever reason). -Eep² 08:21, 2 August 2007 (CEST)

Indeed that has benefits, its chief downside is you run into the string length limit. Any kind of separator has usability problems — users add "cloudy, with chance of rain" as one value, or you use an obscure character sequence. -- Skierpage 22:03, 30 October 2007 (CET)
I would add that having a configurable separator, or escape character would be highly beneficial to the Allows value parameter of the Property. For example, I am creating a sem Wiki that where articles may have ::"Red, Blue"
Right now "Red, Blue" is listed as an allowed value and even shows up on the form, but when its assigned "red, blue" and I go to Browse Properties, I see an error on that property, b/c of the comma.
Personal tools