4D Write v14WR Find |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Write v14
WR Find
WR Find
The WR Find command allows you to search for a character string in a 4D Write area. You can retrieve the position of the words found using the WR GET WORDS command. You can retrieve the position of the selection found using the WR GET SELECTION command. If the character string is found, WR Find returns 1 and select the first occurence. If the search was unsuccessful, WR Find returns 0 and the current selection is not modified. If area does not exist, WR Find returns -1. wholeWord and upperCase allow you to define some options of the search.
In the upperCase parameter, you can pass one of the following constants, found in the WR Parameters theme:
wrap allows you to define whether the search applies to the entire document. In this parameter, you can pass one of the following constants, found in the WR Parameters theme:
You ask users to enter the searched string, then perform the search: ToFind:=Request("Enter the word(s) to find:") This example proposes a keyword-based search method that searches in a selection of records. The search is performed in Picture areas. Important: If you saved your 4D Write areas in BLOB fields, please refer to the example for the WR Direct find command, which is much faster. Your database manages cooking recipes. The 4D Write areas are saved in Picture fields. You want to be able to find all the recipes that use a specific ingredient. Here is the corresponding method: ToFind:=Request("Enter the ingredient(s) to find:") |
PROPERTIES
Product: 4D Write
HISTORY
Created: 4D Write 6.5 SEE ALSO ARTICLE USAGE
4D Write Language ( 4D Write v11.6) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||