Forum is closed

Parse imported mailing address into separate fields

Parse imported mailing address into separate fields

JLinked successfully pulls in the LinkedIn address field which is a textarea. I need to extract at least the city, state & zipcode from this field into separate fields (City, State, Zipcode)

How would I go about doing this?

securepro
Vice President at Aella Consulting Group, Inc.
useravatar
Offline
39 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Parse imported mailing address into separate fields

What extension are you importing the data into and what do you need to separate it out for? The answer can different a bit depending on where it's being imported into and if you're simply trying to export that data to an spreadsheet or if you want to then parse it into mutliple other fields within the extension so that it can be displayed out.

Let us know, and we'll see how we can help. There's a few different options including parsing after the import or changing how the import is done in the first place.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23908 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Parse imported mailing address into separate fields

Jlinked pulls Location into a single CB text area field [location].
I just need to separate that single field into  individual fields in CB for [Street], [City], [State] & [Zipcode].

Having the separate fields will allow me to easily create pull-down filter searches in CB and radius search in CB.
I also use the separate fields to easily calculate statistics and display where my members are located.

Thanks.
Greg

securepro
Vice President at Aella Consulting Group, Inc.
useravatar
Offline
39 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Parse imported mailing address into separate fields

Greg,
JLinked concatenates and tries to merge some fields together to make it easier to import. For instance, "Current Position" grabs the fields "Job Title" and "Company Name" and makes "Peon at Big MegaCorp, Inc" for import into CB or other extensions. When you first asked, I thought that maybe we were making one of those big fields out of street address, city, etc. Unfortunately, that's not the case. LinkedIn simply has a field called "main-address" which we pull and display. The problem with that is that there's no guaranteed formatting on it. In your LinkedIn profile, you can enter that data however you want. So, it could be returned as:
Alex Andreae
Big Corp
123 Easy Street
Anywhere, USA
12345
========
Big Corp
123 Easy Street
Anywhere, USA12345
========
123 Easy Street
Anywhere, USA, 12345
========
Or any other variation. It's basically however the user wants to enter it.. with their name, with their company name, no street address, multiple lines for address and PO box, etc.

Since those aren't discreet fields, we'd need to parse out the field that LinkedIn hands back. As you can see, that may not really be possible. I can gladly help you if you have ideas on "First line always goes to CB field (a), 2nd line to field (b)", but again, that likely won't line up very much.

If it was discreet fields that we were putting together, it'd be much easier as LinkedIn would have already parsed (or asked the user to input) them separately. With the way it is, I just don't see a method to pull the data apart.

Let me know if that helps or gives you any more thoughts/ideas.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23908 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Parse imported mailing address into separate fields

Darn it. 
With LinkedIn's lack of discrete fields, the only thing I think might help would be to parse the entire field for the 5 digit US postal code (doesn't help outside the US but my members are primarily US based).

To my thinking this pattern would be consistent enough to find and then I can derive a City & State from a zipcode database.

securepro
Vice President at Aella Consulting Group, Inc.
useravatar
Offline
39 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11549
Total Polls:
0
Total Posts:
48585
Posts today:
3
User Info
 
Total Users:
47563
Newest User:
dhotañ
Members Online:
0
Guests Online:
588

Online: 
There are no members online
Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program