Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter NineDialog Functions (continued)

DataControlFindCell Function

Overview

The DataControlFindCell function scans a data control to locate a matching cell by content.

Syntax/Parameters

Syntax

int[] = DataControlFindCell ( int id, string match, [dword options],
                         [int row], [int column] );

Parameters

id

An int containing the control ID of the data control.

match

A string value to match during the search. The type of match is directed by the options parameter.

options

An optional dword containing bitwise options for search matching. If omitted, the default value is DCC_FIND_CASE_SENSITIVE.

row

An optional zero-based int specifying a row to begin the search from. The range is not checked. The range is not checked. the default value is -1, start from top of sheet.

column

An optional zero-based int specifying the column to begin the search or the column to restrict the search to. The range is not checked. the default value is -1, or all columns.

Return Value

Returns an int array of two elements for the row and column position or an empty array on failure. Common error codes are as follows: ERROR_RANGE if id is an invalid control ID for the open dialog, ERROR_EOD if the item was not matched, or ERROR_INVALID_HANDLE if no dialog is open. Use the GetLastError function to retrieve error information.

On success, the array key values are “Row” and “Col” or 0 and 1 respectively.

Remarks

The search proceeds from the starting row (default 0) and column until either the end of the data has been reached or a match occurs. Unless the The search is row to row, top to bottom with each row being searched left to right. If a column is specified, only that column will be searched.

Changing the options allows for different match characteristics:

  SDK Definition   Bitwise   Description  
  DCC_FIND_NOT_CASE_SENSITIVE   0x00000000   Find in Non-Case-Sensitive Mode  
  DCC_FIND_CASE_SENSITIVE   0x00000001   Find in Case-Sensitive Mode  
  DCC_FIND_WHOLE_WORDS   0x00000002   Whole Word Only  
  DCC_FIND_PARTIAL_MATCH   0x00000004   Partial Field Match  
  DCC_FIND_COLUMN_ONLY   0x00000010   Match Only Specified Column (requires column parameter be specified)  

 

Normally the entire contents of a cell must match for a positive result. To search the inside, use the partial match option. To match words, combine that with the whole words only option.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic