In a custom content type I have stored values which actually constitute a two dimensional array: I have to store values for each season. The way I did this by creating four fields: one for each season. So I have the fields winter_value, spring_value, summer_value and winter_value. I think that's the only way to store this as I didn't find how to store 2D arrays in CCK.

Now I want to retrieve the value according to the current season. So in winter I want the view to show the winter_value and in spring the spring_value. Is this any way possible in views? Or do I just need to create four different views, one for each season?
I would like to have on page that shows the right values, any season so different pages isn’t realy the solution I’m looking for.

Or should I be looking to encode these values another way? And if so: how?

Comments

psi36’s picture

Is this actually the best place for this kind of question?

I also posted it in http://drupal.org/project/issues/views but there doesn't seem to be much action on there.

Most questions here seem to be less technical/complicated then what I'm asking, so I'm wondering if I'm maybe not in the right place. Any sugestions?

shocknawe’s picture

I also encountered this problem, and the best solution i found was using the field collection module:

http://drupal.org/project/field_collection

I created a collection with Number of Values: "Unlimited"
and inside the collection was a text field with Number of Values "Unlimited"

Hope this helps.