CasewareDocs

DeleteField

Deletes an IDEA field by name.

Compatibility

Available as of IDEA version 10.0

Syntax

DeleteField(database as IdeaDatabase,fieldName as String)

Parameters

database

Object containing the currently open database.

fieldName

Name of the field that needs to be deleted.

Remark

An error is raised if database or fieldName is null or fieldName is empty.

Example

'Entry point of the commands

Dim SimpleCommands As Object
Dim db As Object

Sub Main()

'Initialization
Set SimpleCommands = SmartContext.MacroCommands.SimpleCommands
'Opens database

Set db = Client.OpenDatabase("Test.imd") 
'Deletes column "Name" from "Test.imd"

SimpleCommands.DeleteField db, "Name"

'Close database
db.Close
Set db = Nothing

'Releases object
Set SimpleCommands = Nothing

End Sub