Automatic Field Name Updates

7 posts / 0 new
Last post
aveenm293
Offline
Joined: 10/23/2012 - 16:02
Automatic Field Name Updates

Hi Brian
I am trying to create a custom script that will automatically update field names without manually updating each of them using Field Manipulation. Essentially I would import two separate files. One would contain the "Raw Field Name" and "Updated Field Name". The other file would be the dataset on which the field names need to be updated. I have attached an example dataset. For example:
The field AN8 represents the Employee Number. In the Data Set Tab we would need to rename the column "AN8" to "Employee Number".
Any ideas on how to start this script for IDEA 9?
Thank you
Regards
Aveen
 
 

Images: 
Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Aveen,

What I would do is read through the file with the raw and updated names.  I would use the rename field function I have here (http://ideascripting.com/snippet/renamefields-function) and then for each row in the database I would send the name of the database to be updated with the old name and the new name that you have read from the name update database.

Let me know if you need help writing the script.

Brian

aveenm293
Offline
Joined: 10/23/2012 - 16:02

Hi Brian
Please can you assist me with writng the script.
Thank you
Regards
Aveen
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Not a problem, I will post something later on.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Aveen, can you try out this script and let me know if it does the trick.

Brian

aveenm293
Offline
Joined: 10/23/2012 - 16:02

Hi Brian
Thank you very much!
It works like a dream
Regards
Aveen
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

That is good to hear Aveen, I will post it on the site as one of the scripts.

Thanks