Skip to main content

Suggestions for IDEAScript snippets

Description

Suggestion for useful functions that could be inserted into an IDEAScript

Delete HelpTables

if you make makros where you need to make some extraktions,... you will have some "helping tables"
to get your result.. sorry for my bad english, but hope you understand what i mean or talking about...

when you want to delete these "helping tables" after your result was generated you could do it
this way:

if you make some extraktion call every helping table with the same prefix...
e.g. call them:

dbName = Client.UniqueFileName ("HelpTab_xxxxxxxxx")

after your main programm is finished you could start this sub unit:

Does a column exists in the table?

If you want to create a new column in a table just look if it is not still existing...

The fastest way to do that that i know is as followed:

'If you want to create a new column in a table just look if it is not still existing...

sTableName = Dir(Client.Workingdirectory + "tableName.IMD")
Set db = Client.OpenDatabase(sTableName)
Set table = db.TableDef
iFieldCnt = table.count