Please enable JavaScript to view this site.

ESL Documentation

Action Statement

Find a text string in a table.

find in

{ TABLE_NAME

column COL_ID of TABLE_NAME

row ROW_ID of TABLE_NAME

column COL_ID of row ROW_ID of TABLE_NAME }

[from [ [row] ROW_ID | next] [selected]

[ignore case] [complete | beginning] ]

STRING_SV

TABLE_NAME

The identifier for a table. Search all columns in the table. All columns in a row are checked before going to the next row.

column COL_ID of TABLE_NAME

Only search the specified column.

row ROW_ID of TABLE_NAME

Only search the specified row. Do not use with a from clause.

column COL_ID of row ROW_ID of TABLE_NAME

Only search the specified cell. Do not use with a from clause.

from row ROW_ID

Search starting at the specified row. The default is to search from the current row.

from next

Search starting at the row after the current row. This is useful for continuing a search to find additional matches.

selected

Search only in the selected rows or columns. When searching in a column, limit the search to the rows that are selected. When searching in a row, limit the search to the columns that are selected. When searching in a cell, this will be ignored.

ignore case

Ignore the case of text when searching. The default is an exact match.

complete

Match only if STRING_SV matches the entire contents of a column, from beginning to end. This is useful when matching date and numeric values or full names. The default is to match if the string is anywhere in the column.

beginning

Match only if STRING_SV matches from the beginning of the column.

STRING

The string you want matched.

Description

Use this statement to find a text string in a table. The search string is compared to the contents of each cell, as converted to a string by ESL. (This means that neither numeric nor boolean formatting are used.) That is, the search value is the same as if the cell contents were copied to a string. If STRING_SV is found, ESL makes that cell the current cell and sets the found variable to true. If STRING_SV is not found, ESL sets the variable to false. This statement does not cause the table to scroll.

The parent of the table may not be temporary and invisible when you issue this statement, or it will be ignored.

Example

 

response to item FindTable_MC from Menu_AB

 copy "Find In Table" to MsgStr_SV

 action InvokeFindDialog

 if (InputOK_BV) then

         if (FComplete_BV) then

                 if (FSelected_BV and IgnoreCase_BV) then

                         if (FNext_BV) then

                                 find in Table_TBL from next selected ignore case

                                 complete Str_SV

                         else

                                 find in Table_TBL selected ignore case

                                 complete Str_SV

                         end if

                 else if (FSelected_BV) then

                         if (FNext_BV) then

                                 find in Table_TBL from next selected

                                 complete Str_SV

                         else

                                 find in Table_TBL selected complete Str_SV

                         end if

                 end if

         end if

end if

...