Multiple values for a property on the same page

View: New views
3 Messages — Rating Filter:   Alert me  

Multiple values for a property on the same page

by Theodore Turocy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

For some time on our project, we have been taking advantage of the
ability to set multiple values for the same property on a page.  For
instance on a page, we do both

[[ourproperty::Foo]]

and

[[ourproperty::Bar]]

where Foo and Bar are other pages in the wiki. We then exploit queries
on, e.g., {{#ask: [[ourproperty::Foo]] ... }} to find pages which
reference Foo, Bar, etc.  It's simplified some complicated problems
for us enormously.

Today, I tried to do the same thing with another property, except I
wanted the property to be [[has type::string]] instead of [[has
type::page]], and found the behavior was different.  If I am
understanding what's going on, SMW is now concatenating "Foo" and
"Bar" instead of doing a multi-valued property, as it seems to do with
pages.  So queries like {{#ask: [[ourproperty::Foo]] ...}} now fail if
another value is also specified for the property, although {{#ask:
[[ourproperty::~*Foo*]] ...}} works correctly.

Is this the intended behavior?  I can workaround the problem by
setting Property:ourproperty to [[has type::page]], but these values
really are strings and not pages.  Is there a reason for concatenating
the values instead of having multiple values, except in the special
case of pages?  Or -- worse for us -- is the behavior with pages
simply an unintended "feature" that might go away?  (Please, please
don't tell me it's the latter. :)

Marginally confused and somewhat surprised,

Ted

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-user

Re: Multiple values for a property on the same page

by Beebe, Mary J :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Did you every get an answer to this?  I did not see it anywhere?  

Mary Beebe
 
-----Original Message-----
From: Theodore Turocy [mailto:drarbiter@...]
Sent: Thursday, October 22, 2009 1:37 PM
To: semediawiki-user@...
Subject: [Semediawiki-user] Multiple values for a property on the same page

Hi all,

For some time on our project, we have been taking advantage of the
ability to set multiple values for the same property on a page.  For
instance on a page, we do both

[[ourproperty::Foo]]

and

[[ourproperty::Bar]]

where Foo and Bar are other pages in the wiki. We then exploit queries
on, e.g., {{#ask: [[ourproperty::Foo]] ... }} to find pages which
reference Foo, Bar, etc.  It's simplified some complicated problems
for us enormously.

Today, I tried to do the same thing with another property, except I
wanted the property to be [[has type::string]] instead of [[has
type::page]], and found the behavior was different.  If I am
understanding what's going on, SMW is now concatenating "Foo" and
"Bar" instead of doing a multi-valued property, as it seems to do with
pages.  So queries like {{#ask: [[ourproperty::Foo]] ...}} now fail if
another value is also specified for the property, although {{#ask:
[[ourproperty::~*Foo*]] ...}} works correctly.

Is this the intended behavior?  I can workaround the problem by
setting Property:ourproperty to [[has type::page]], but these values
really are strings and not pages.  Is there a reason for concatenating
the values instead of having multiple values, except in the special
case of pages?  Or -- worse for us -- is the behavior with pages
simply an unintended "feature" that might go away?  (Please, please
don't tell me it's the latter. :)

Marginally confused and somewhat surprised,

Ted

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-user

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-user

Re: Multiple values for a property on the same page

by Theodore Turocy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 6, 2009 at 10:28 AM, Beebe, Mary J <BeebeM@...> wrote:
> Did you every get an answer to this?  I did not see it anywhere?

No, I didn't.  In our case, it turned out that we can think of the
contents of that field as a page name, so it worked out for us.  But,
we'd still like to get confirmation as to what the intended behavior
is -- it would be bad for us if the behavior would be removed in the
future someday.

Ted


> Mary Beebe
>
> -----Original Message-----
> From: Theodore Turocy [mailto:drarbiter@...]
> Sent: Thursday, October 22, 2009 1:37 PM
> To: semediawiki-user@...
> Subject: [Semediawiki-user] Multiple values for a property on the same page
>
> Hi all,
>
> For some time on our project, we have been taking advantage of the
> ability to set multiple values for the same property on a page.  For
> instance on a page, we do both
>
> [[ourproperty::Foo]]
>
> and
>
> [[ourproperty::Bar]]
>
> where Foo and Bar are other pages in the wiki. We then exploit queries
> on, e.g., {{#ask: [[ourproperty::Foo]] ... }} to find pages which
> reference Foo, Bar, etc.  It's simplified some complicated problems
> for us enormously.
>
> Today, I tried to do the same thing with another property, except I
> wanted the property to be [[has type::string]] instead of [[has
> type::page]], and found the behavior was different.  If I am
> understanding what's going on, SMW is now concatenating "Foo" and
> "Bar" instead of doing a multi-valued property, as it seems to do with
> pages.  So queries like {{#ask: [[ourproperty::Foo]] ...}} now fail if
> another value is also specified for the property, although {{#ask:
> [[ourproperty::~*Foo*]] ...}} works correctly.
>
> Is this the intended behavior?  I can workaround the problem by
> setting Property:ourproperty to [[has type::page]], but these values
> really are strings and not pages.  Is there a reason for concatenating
> the values instead of having multiple values, except in the special
> case of pages?  Or -- worse for us -- is the behavior with pages
> simply an unintended "feature" that might go away?  (Please, please
> don't tell me it's the latter. :)
>
> Marginally confused and somewhat surprised,
>
> Ted
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Semediawiki-user mailing list
> Semediawiki-user@...
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-user