Office Connector Web HelpOnline Help

TSWrite Function

Contents Index


 The TSWrite function writes a value to a specific field on a specific record in a Timberline Office database.

Syntax

TSWrite( table name , field name , value , action , [ key1 ] , [ ... keyn ] )

The TSWrite function syntax has these parts:
ArgumentDescription
table nameRequired. This argument identifies a specific internal table name in the Timberline Office database.
field nameRequired. This argument identifies a specific internal field name. The field name must identify a valid field for the table identified by the table name argument.


valueRequired. This argument specifies the value to be written to the field identified by the field name argument.
actionRequired. This argument specifies the desired action.
key 1 ... key nRequired. These arguments provide the values of the primary key for the specific record desired. The number of key values and their meaning will depend on the table that was identified by the table name argument.

Action

The following values can be used for action:
CreateOnlyIf the record indicated by key 1 ... key n is not found, it will be created.  Existing records will not be updated.
CreateOrModifyIf the record indicated by key 1 ... key n is found, it will be updated; otherwise it will be created.
ModifyOnlyIf the record indicated by key 1 ... key n is found, it will be updated; otherwise an error message is displayed on the Write Results Report.
IgnoreNo action will be taken.  
Note -Leaving this parameter blank has the same result as specifying Ignore.

Remarks

If multiple TSWrite functions write to the same record but specify different actions, a message will be displayed and you will be required to resolve all conflicting actions using the Approve Changes window before values can be sent to Timberline.

If multiple TSWrite functions write to the same record and field, a message will be displayed and you will be required to remove the duplicates before values can be sent to Timberline.

Example

Click here for examples.


See Also



Content updated 12/4/2012

Copyright 2012 Event 1 Software, Inc.  This documentation may not be copied in full or in part without written permission from Event 1 Software, Inc.