Bug in arraymap?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in arraymap?

Tom Hutchison
Might be more for Yaron

 

Having an issue with a form and mapping to an arraymap to values in a
template.

 

Choices in form

 

Media type, allowed values in property

Class, allowed values in property

Hosted by, allowed values in property

 

Setting this:

Media: Video

Class: Class 1, Class 2, Class 5

Hosted by: YouTube

 

Output always adds extra commas to the Hosted by output so it looks like:

 

Hosted by: YouTube,, (the number of extra commas depends on the number of
commas in Class=)

 

If I drop choices in Class to 2 choices, Class 1, Class 5 then Hosted by:
YouTube, (one extra comma)

If I increase choices to Class to 4 choices then Hosted by: YouTube,,,
(three extra commas)

 

It is almost as if the arraymap is holding the number of the array and
adding blank values. Media has no effect on the other two, but there is a
text input below that property in my template before Class property.

 

I have tried mixing the value of the array parameter.
{{#arraymap:{{{Class|}}}|,|y|[[Class::y]]}}  {{#arraymap:{{{Hosted
by|}}}|,|h|[[Hosted by::h]]}}

 

What perplexes me is the Media property multiple choices has no effect on
Class or Hosted by.

 

Thanks

 

Tom

 

 

 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Bug in arraymap?

Tom Hutchison
Never mind, I figured out it was coming from categories arraymap and adding
|  as the new delimiter to the end of the arraymap fixed it. Sorry to
bother everyone.

Tom

-----Original Message-----
From: Tom Hutchison [mailto:[hidden email]]
Sent: Sunday, July 30, 2017 11:49 AM
To: 'SMW List' <[hidden email]>
Subject: [Semediawiki-user] Bug in arraymap?

Might be more for Yaron

 

Having an issue with a form and mapping to an arraymap to values in a
template.

 

Choices in form

 

Media type, allowed values in property

Class, allowed values in property

Hosted by, allowed values in property

 

Setting this:

Media: Video

Class: Class 1, Class 2, Class 5

Hosted by: YouTube

 

Output always adds extra commas to the Hosted by output so it looks like:

 

Hosted by: YouTube,, (the number of extra commas depends on the number of
commas in Class=)

 

If I drop choices in Class to 2 choices, Class 1, Class 5 then Hosted by:
YouTube, (one extra comma)

If I increase choices to Class to 4 choices then Hosted by: YouTube,,,
(three extra commas)

 

It is almost as if the arraymap is holding the number of the array and
adding blank values. Media has no effect on the other two, but there is a
text input below that property in my template before Class property.

 

I have tried mixing the value of the array parameter.
{{#arraymap:{{{Class|}}}|,|y|[[Class::y]]}}  {{#arraymap:{{{Hosted
by|}}}|,|h|[[Hosted by::h]]}}

 

What perplexes me is the Media property multiple choices has no effect on
Class or Hosted by.

 

Thanks

 

Tom

 

 

 

----------------------------------------------------------------------------
--
Check out the vibrant tech community on one of the world's most engaging
tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user