n-deep nesting (was: getting this error when I enter a csv file?)

mrgoltra - June 2, 2007 - 18:56
Project:Fixed Data Dropdown
Version:5.x-1.x-dev
Component:Documentation
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

* Illegal value for Country List Drop Down.
* The default value is invalid.

is there a specific format for a csv file? Is there a compiled list somewhere I can test?

Thank you,

Mark

#1

markfoodyburton - June 3, 2007 - 05:36

Hi Mark,

I dont fully understand the question, but I'll try and explain what the thing does

There is a "regular expression" field on the setup page for the fixeddatadropdown. At the moment, the default is set to a quite complex looking string...

Actually, all that regular expression does is say, if it's 2 coma separated fields, use it.
Whats worse, the default regular expression isn't very robust, so
"hello, how are you", 2
Would be parsed as
"hello and how are you",2
Which is probably not what you want.

But, as a starter it's ok I think - if somebody comes up with a better one, so be it :-)

So, if you dont want to edit the regular expression at all, then sort out your data so it looks like

KEY1, VALUE1
KEY2, VALUE2
KEY3, VALUE3
KEY2, VALUE4
KEY1, VALUE5
...
etc

I hope this helps. If you do want to edit the regular expression - it's VERY easy to do, and you should not be scared, just read up on regular expressions and then you can make what changes you need. For instance, my test data has 4 columns, 2 of which I dont care about, and the columns are separated with ";" not ","....

Cheers

Mark.

#2

markfoodyburton - June 3, 2007 - 05:37

Hi Mark,

I dont fully understand the question, but I'll try and explain what the thing does

There is a "regular expression" field on the setup page for the fixeddatadropdown. At the moment, the default is set to a quite complex looking string...

Actually, all that regular expression does is say, if it's 2 coma separated fields, use it.
Whats worse, the default regular expression isn't very robust, so
"hello, how are you", 2
Would be parsed as
"hello and how are you",2
Which is probably not what you want.

But, as a starter it's ok I think - if somebody comes up with a better one, so be it :-)

So, if you dont want to edit the regular expression at all, then sort out your data so it looks like

KEY1, VALUE1
KEY2, VALUE2
KEY3, VALUE3
KEY2, VALUE4
KEY1, VALUE5
...
etc

I hope this helps. If you do want to edit the regular expression - it's VERY easy to do, and you should not be scared, just read up on regular expressions and then you can make what changes you need. For instance, my test data has 4 columns, 2 of which I dont care about, and the columns are separated with ";" not ","....

Cheers

Mark.

#3

mrgoltra - June 3, 2007 - 22:58

Hi Mark,

Thank you for the reply. What I am trying to accomplish is to have a cck fields (country) when selected will populate the corresponding the state/region to that country field then populate the city field as a selection, etc. I don't know if this is a way to go about it, I tried the other module but I can't even enable the module, so I am looking for a way to implement this on my content type page.

Thank you ,

Mark

#4

markfoodyburton - June 4, 2007 - 06:24

This module should work just the way you want it to :-)
(It's almost exactly what I'm using it for :-) )

so, you need to get a list of all the countries and states/regions
something like
uk, Hartfordshire
uk, Hampshire
uk, TooMuchMoneyShire
uk, SlumShire
France, Dordogne
France, Sounds Nice
France, Paris
etc etc
Then you need to pull that (HUGE) list in using the interface as we previously discussed....

(I'm sorry there s a delay in getting back to you, I'm traveling, but I will try to be responsive)

#5

mrgoltra - June 4, 2007 - 07:28

Thanks for the follow up, I will try to find something.

One more question, if you don't mind. ( I am new to all of this(everything), sorry)

so, you need to get a list of all the countries and states/regions
something like
uk, Hartfordshire
uk, Hampshire
uk, TooMuchMoneyShire
uk, SlumShire
France, Dordogne
France, Sounds Nice
France, Paris

so the sequence should be

country > state/region > city

US > California > Los Angeles
US > California > San Francisco

Philippines > Luzon > Manila
Philippines > Visayas > Cebu

Canada > Ontario > Toronto

Is this format accepted? can I even go US > California > Los Angeles > Site 1 ?

Thank you for all your help. I was trying this with Taxonomy + CCK + Activeselect but no go. Another route was to built the taxonomy (country - populated, state/region and city will be just an autocomplete field where I would rely on user's to populate the specified taxonomy, but anyone can just enter any info...

Thanks again,

Mark

#6

mrgoltra - June 4, 2007 - 07:29

sorry about the block quote below yours actual quote.

#7

markfoodyburton - June 4, 2007 - 11:58
Title:getting this error when I enter a csv file?» n-deep nesting (was: getting this error when I enter a csv file?)
Category:support request» feature request
Status:active» postponed

ok, sorry, we do have a problem :-(

I was thinking you ONLY wanted country, region

If you want n-deep nesting, this module COULD be adapted to do that, but I haven't done it yet.
(I've changed this into a feature request)

There may be somebody out there that would like to address this, but I dont need it personally, so I am unlikely to do the job unless somebody wants to persuade me... I dont think it would take more than a few days, but right now, I cant afford to spend those days....

#8

mrgoltra - June 4, 2007 - 17:44

Hi Mark,

Thank you again, not a problem for me. Actually I am very grateful for the help, enjoy your trip.

Thank you,

Mark

#9

tumnus - September 4, 2007 - 03:09

+1 for this feature.

 
 

Drupal is a registered trademark of Dries Buytaert.