Simplicty and flexibility!


Function::Internal

Create
Create("NewTablename","Keyword","TemplateTable")
Create("NewTable130215","Copy","MyCustomers")
Create("MyTable","Delete")
retval:=Create("ATable","CopyWithFormOpenDT","Customers") .


To create a table during runtime that can be used for storing history, data-manipulation and eventually direct user interaction.

In version 1 this function will only be usable from ExecDQL as all other Documents/procedure can only access pre-defined tables.

Parameters


NewTableName: Text
    Name of new table that you want to create. Can be any text and also constructed via derivation i.e Jointext ("Customers",current date) etc.

Keyword: Text

    Copy: This will copy the structure including the Relationship from the TemplateTable.
    Delete : This keyword will delete the table named in NewTableName.
   DeleteWithForm: Delete the table and any corresponding form with the same name.
   CopyWithForm: Will copy the table and form (if any) with the same name as the table
   CopyWithFormOpen: Will copy the table and form with same name as table and open this form in User Mode.
   COpyWithFormOpenDT: Will copy the table and form with the same name as table and open this form in Design Mode.

TemplateTable: Text
    This is the name of the table that we want to copy the structure from.

Returns/Result


Result:text

"0" : Success
"1" : No table with given name, failure. No action.
"2" : No korresponding Form, table will be copied but without form.

Examples


Reference

See Also


On the forum about Create

On the blog about Create


dg3_HelpView