Xbasic
A5.APPEND_ENUM Function
Syntax
A5.Append_Enum(C lastname|N object_enum_flags)
Operation_List as C = A5.APPEND_ENUM( [ object_enum_flags N ] )
Character Next_Operation= A5.APPEND_ENUM(lastname as C)
Arguments
- Operation_List
Full filenames for the append operations stored in the currently open table.
- Next_Operation
The next operation of the type.
- object_enum_flags
Optional. Default = Null.
- Null = Operation name, full path, and filename.
- 2 = Operation name
- 4 = Operation type, Object name, full path, and filename
- 8 = Quoted operation name, full path, and filename.
- 12 = Operation type, quoted operation name, full path, and filename formatted for tree control.
- lastname
The quoted name of an operation.
Description
The APPEND_ENUM() method returns the name of the next saved append operation.
Example
This script populates an array with all of the append operations in a database.
dim operation_names 100 as C operations_names.initialize(A5.append_enum())
This script brings up a list of the append operations and then runs the append if the user selects one
dim operation_names 100 as C
append_name = A5.append_enum("")
if (append_name <>"") then
i = 1
'While the append_enum method returns nonblank names, get next name
while append_name <>""
operation_names i= append_name
append_name = A5.append_enum(append_name)
i = i + 1
end while
'sort the array, otherwise names will be in order in which operations were created.
operation_names.sort()
' Show the user a list of names
result = ui_get_list_array("Select append", 1, "operation_names")
' If the user selects an append, then run it
if (result <>"") then
:append.run(result)
end if
else
message = "Cannot perform a saved append operation "
message = message + "because there are no saved appends defined"
ui_msg_box("No append operations", message, UI_ATTENTION_SYMBOL)
end if
? a5.Append_Enum("Append3@c:\databases\expressions test\ed2.ddd")
= "Append2@c:\databases\expressions test\ed2.ddd"
? a5.Append_Enum(12)
= APPEND."Append3@c:\databases\expressions test\ed2.ddd"
APPEND."Append2@c:\databases\expressions test\ed2.ddd"
APPEND."Append1@c:\databases\expressions test\ed2.ddd"
? a5.Append_Enum(4)
= APPEND Append3@c:\databases\expressions test\ed2.ddd
APPEND Append2@c:\databases\expressions test\ed2.ddd
APPEND Append1@c:\databases\expressions test\ed2.ddd
? a5.Append_Enum(2)
= Append3
Append2
Append1
? a5.Append_Enum()
= Append3@c:\databases\expressions test\ed2.ddd
Append2@c:\databases\expressions test\ed2.ddd
Append1@c:\databases\expressions test\ed2.dddSee Also