We all have run in trouble in the past when for a lot of tables the same update needs to be done:
Below script can help you out. It will look in all tables that are in the database (SQLDictionary) Next it will find the related AOT Tree node.
static void ChangeTableProperties(Args _args) { SQLDictionary dictionary; TreeNode treeNode; str properties; ; while select dictionary where dictionary.fieldId == 0 && dictionary.name like("Proj*") { treeNode = TreeNode::findNode('\\data dictionary\\tables\\'+dictionary.name); if (treeNode) { properties = treeNode.AOTgetProperties(); properties = setProperty(properties, 'CreatedDateTime', 'Yes'); properties = setProperty(properties, 'CreatedBy', 'Yes'); treeNode.AOTsetProperties(properties); treeNode.AOTsave(); } } } |