Looking for advice on how to add latitude and longitude fields to multiple tables in database

By gadefgaertgqe - December 8, 2010 - edited: December 8, 2010

Hello,

Is there a recommended way to add the latitude and longitude fields for the geocoder plugin to multiple tables, without doing it manually in CMSB?

At the moment I have about 60 tables that need updating.

This question is also an attempt to find out if it's possible to update multiple tables in the future with other content as and when needed. The number of tables will increase to about 150 / 200 in the future, so I need to be prepared to update these in an efficient manner. If I had to update the full amount of tables with both the latitude and longitude that would be 200 x 2 = 400 modifications. Not a prospect I relish lol.

All my tables are named in a logical manner. For example the tables I need to update in this instance all end with: _main

Any ideas people?

A plugin for doing this kind of work would rock :)

Thanks in advance.

Paul

Re: [Pixels & Beats] Looking for advice on how to add latitude and longitude fields to multiple tables in database

By Jason - December 8, 2010

Hi Paul,

Currently, the only way to add a field to a section is to manually do it one section at a time. However, it would be possible to create a plugin that could allow for a field to be added to multiple sections. If you're interested in developing this, please send an email to consulting@interactivetools.com and we can go over what it would take to accomplish this.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Looking for advice on how to add latitude and longitude fields to multiple tables in database

By Chris - December 8, 2010

Hi Paul,

A low-tech trick is to open each of your sections' Section Editor pages in separate tabs in your browser, copy "latitude" into your clipboard, then you can quickly repeat these steps for each section: click on Field Label, <ctrl>+V, <enter>, <ctrl>+<tab>. Repeat for "longitude".

Of course, as Jason mentioned, we could also make you a custom tool to make modifying many sections simpler.

I hope this helps!
All the best,
Chris

Re: [Pixels & Beats] Looking for advice on how to add latitude and longitude fields to multiple tables in database

By Dave - December 9, 2010

Hey Paul,

Looks like everyone is jumping in on this post! :) Actually I was going to say that I was thinking about adding that feature to version 1.01 or 1.02 to auto add those fields. If you'd like to beta it email at dave@interactivetools.com and I'll see what I can do for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Looking for advice on how to add latitude and longitude fields to multiple tables in database

First of all thanks for all the answers guys!

Jason: This is more of a just in case and try to be prepared for any future additions. However I cannot justify the cost to my MD as it's not needed at this moment in time. Maybe in the future.

Chris: I'll probably give that a go. It had crossed my mind but thought I would ask first. Nothing wrong with a bit of low-tech ;)

Dave: Always up for a bit of beta testing! Any idea when that would be? Technically I should be live by now. If it's going to be a number of days / weeks then I will probably run with Chris's suggestion.

Thanks

Paul

Re: [Pixels & Beats] Looking for advice on how to add latitude and longitude fields to multiple tables in database

By Dave - December 9, 2010

Hi Paul,

I was just thinking of adding a button to the "GeoCode Tables" menu to "Add Lat/Lng fields", so if you already have them in there you should be good.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Looking for advice on how to add latitude and longitude fields to multiple tables in database

That button would be very useful to people in the future and is a great idea.

Can I also suggest making it so that people can choose multiple tables using check boxes to avoid the whole 'rinse and repeat' scenario? Especially when they have lots of tables . . . .

Thanks :)

Paul