Personaly I think this should be in the F1 (Help) function, don't you think?
Regards,
it is in the Online Help:
FIND (Record)
Use this function to find a record in a C/SIDE table based on the values stored in keys.
Ok := Record.FIND([Which])
...
...
Which
Data type: text or code
Tells the system how to perform the search. The system searches through the table until either it finds the record or there are no more records. Each character in this string can be present only once. You can combine the '=', '<' and '>' characters.
This... Tells the system to search for...
'=' A record that equals the key values (default)
'>' A record that is larger than the key values
'<' A record that is less the key values
...
but the meaning of a find string like '=<>' isn't explained.
It says that each character can be used once and can be combined,
but how navision treats this SearchString isn't mentioned.
Correct me if i'm wrong but it the following quote doesn't explain that the SearchString is parsed as JM replied on my post:
FIND (Record)
Use this function to find a record in a C/SIDE table based on the values stored in keys.
Ok := Record.FIND([Which])
Ok
Data type: boolean
If you omit this optional return value, a run-time error occurs if the system cannot find the record. If you include a return value, the system assumes you will handle any errors. Ok can have these values:
If Ok is...
It means the record was...
TRUE
Found
FALSE
Not found
Record
Data type: record
On input, Record identifies the record you want the system to find. On output, there are two possibilities:
If the record was...
Then...
Found
The system returns the record in Record and sets any FlowField in the record to zero. You must update them using CALCFIELDS.
Not found
A run-time error occurs, if you omitted the return value Ok.
Which
Data type: text or code
Tells the system how to perform the search. The system searches through the table until either it finds the record or there are no more records. Each character in this string can be present only once. You can combine the '=', '<' and '>' characters.
This...
Tells the system to search for...
'='
A record that equals the key values (default)
'>'
A record that is larger than the key values
'<'
A record that is less the key values
'+'
The last record in the table ('+' can only be used alone)
'-'
The first record in the table ('-' can only be used alone)
If SearchStr contains '=', '>' or '<', you must assign values to all fields of the current and primary keys before you call FIND.
Comments
FIND retrieves the first record that meets the conditions set by SearchStr and the filters associated with Record. The search path reflects the sort order defined by the current key. If the current key is not the primary key, there is a chance that several records might have the same values in current key fields. If this happens, the system uses the sort order defined by the primary key as the search path.
Example
This C/AL code shows how to use the FIND function:
dialog.OPEN('Search for customer number...\'
+ '#1##################');
dialog.INPUT(1, Customer."No.");
IF Customer.FIND THEN
MESSAGE(Text000 + Text001, Customer."No.", Customer.Name)
ELSE
MESSAGE(Text002);
Create the following text constants in the C/AL Globals window:
Text Constant
ENU Value
Text000
'The customer was found.\'
Text001
'Customer No. %1 is:\%2'
Text002
'Sorry, that customer could not be found...'
First, the system prompts you to enter a customer number to search for:
Search for customer number...
If the number you enter does not exist, the system displays this message:
Sorry, that customer could not be found...
If the system finds the number in the Customer table, it could display:
The customer was found.
Customer number AAA 1050 is:
AAA Furniture Manufacturing
Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!
but the meaning of a find string like '=<>' isn't explained.
It is a 3-step Find in the order stated.
It means first try to find a record that is equal, if not successful try to find one that is smaller, if still not successful try to find one that is larger than the key values.
Comments
FIND('=><')
is like first: FIND('=') => Find equal,
if not found: FIND('>') => Search for next (upwards),
if not found: FIND('<') => Search for next (downwards)
br
Josef Metz
Josef Metz
Personaly I think this should be in the F1 (Help) function, don't you think?
Regards,
...
Everybody on-line.
...
Looking good!
RIS Plus, LLC
it is in the Online Help:
br
Josef Metz
Josef Metz
but the meaning of a find string like '=<>' isn't explained.
It says that each character can be used once and can be combined,
but how navision treats this SearchString isn't mentioned.
Correct me if i'm wrong but it the following quote doesn't explain that the SearchString is parsed as JM replied on my post:
...
Everybody on-line.
...
Looking good!
You can go to https://mbs.microsoft.com/partnersource/productsuggestion and make a product suggestion.
br
Josef Metz
Josef Metz
It means first try to find a record that is equal, if not successful try to find one that is smaller, if still not successful try to find one that is larger than the key values.