As far as the hiding certain selections goes in the script you can use:
then for the fields you want hidden place this symbol before the name like:
As far as changing the names, I am not aware of an easy way. You can create a text object to display current selections of a field with your own label but for a large script this could become quite large.
Im keen to understand this if anyone has a solution.
From a users perspective the field names (driven by how they are stored in the original DB) in the current selection arent staright forward, but if the current selection refers to the relabeling I gave to the list box you make the selection from , it would be far simpler for the user to read.
To make a quick and powerful rename of fields, you can do like this.
Say you have a set of fields called DAT02L, TSTRP03, KLK44CN.
Then you can do like this (pseudo code):
MapFieldLabels: MAPPING LOAD INLINE CodedFieldName, HumanReadableFieldName DAT02L, Date of purchase TSTRP03, Test report number INV44CS, Invoice customer number RENAME FIELDS USING MapFieldLabels;
After running the code, all fields in the data model are checked against the mapping table and renamed accordingly.
The same logic can be used for field comments:
COMMENT FIELDS USING MapFieldComments;
well i thought i got this working but only partially.
if i do
then load table1 to be converted
this works fine
if i put the fieldmap and rename around 2 tables to be it doesnt
then load table1 to be converted, then load table 2 to be converted.
if I load the field map in twice , around both tables, only the 1st table is converted. If the 2nd table has values equal to those in the 1st these ie. key fields, are ignored. Only new unique field names are changed.
So do i need a tablemap for every table i want to convert? Or is there an easy way ,so i can just put all the table map values in one table and this will blanket convert every table in my schema?