This script will allow you to add a prefix or a suffix to all your field names. This is great when performing a join or Visual Connector and don't want the entire file name to be included.
This script can be used to add a prefix or a suffix of your choosing to all the field names of an IDEA file. This is a good way to add something unique to the field names before performing a join or using the visual connector, by doing this first you will be able to tell which file the field originally came from. You can do this with Visual Connector but it only allows the option of the filename which can make filenames extremely long, this way you can use one or two characters to represent each file.
When you run the script you will see the following dialog:
In the dialog the currently open file will automatically be chosen but you can change this. Next you enter the text that will make up the prefix or suffix. The text has to follow the IDEA naming convention so only characters and numbers, for a prefix the first character has to be a letter. The script will automaticaly change lowercase to uppercase and add an underscore between the field name and the prefix / suffix. Final thing is to indicate if this is for a prefix (in front of the field name) or a suffix (after the field name) the default is prefix.
Here is an example of the field names before running the script:
This is after running the script and adding bank as a prefix:
And this is after running the script and adding bank as a suffix: