TSFind Function

The TSFind function searches for records in a table and returns the value from a specific field.  Conditions may be used to identify the record or records that should be read.


TSFind( table name , field name , [ filter ] , [ offset ] )

The TSFind function syntax has these parts:

table nameRequired. This argument identifies an SQL statement or a specific internal table name in the Timberline Office database.  If this argument does not supply a valid source of data, then the result of the function will be #TABLE? ("table name" not found).
field nameRequired. This argument identifies an internal field name or alias returned by the table name argument.  If this argument does not contain a valid field name, then the result of the function will be  #FIELD? ("field name" not found).
filterOptional.  A filter is a string of text that includes comparisons between fields in the table and specific values.  Only the records that satisfy the filter conditions will be used to return values.
offsetOptional.  If more than one record meets the filter conditions, this value may be used to indicate which record the value should be read from.  A value of 0 returns the first match.  Positive values indicate the number of records that should be skipped (e.g. 1 would skip the first match and return the second match).  Available as of version 2.01.0018, negative values skip records, but in the opposite direction (e.g. -1 would skip to the last record, -2 would skip to the second-to-last record, etc).The value for offset must be in the range of -n to n-1, where n represents the number of records satisfying the filter.  If the value for offset is outside of this range, no value is returned.


If the function does not return a value, Excel may interpret that to be a zero or a date depending on the cell format.


Click here for examples.