FIND vs FINDSET
gulamdastagir
Member Posts: 411
Hi navies,
Plz can anyone tell me the Technical difference between FIND and FINDSET because i dont find FINDSET on C/AL Symbol Menu(F5)
Iam on NAV(4SP1).
Plz can anyone tell me the Technical difference between FIND and FINDSET because i dont find FINDSET on C/AL Symbol Menu(F5)
Iam on NAV(4SP1).
Regards,
GD
GD
0
Comments
-
Ok := Record.FINDSET([ForUpdate][, UpdateKey])
Use this function to find a set of records in a table based on the current key and filter. The records can only be
retrieved in ascending order. "ForUpdate": Set this to FALSE if you don't intend to modify any records in the set.
"ForUpdateKey": If you are going to modify any field value within the current key, set this parameter to TRUE.0 -
thanks =D>Regards,
GD0 -
With FINDSET you have more control over the isolation level of the query when you are writing the code. With FIND you don't have that option.0
-
And is supported from version 4.00SP1, if you are on NAV 4.00 w/o SP, you will not see the commands in the F5 menu. Check the client version in About dialog.0
-
Findset ist the same as find('-') on the first look, but with findset you have the option to optimize the sql performance for modifing data...
I made myself a rule:
- More than 500 records: Find('-')
- Less than 500 records: Findset
500 ist the default buffer of recordsets in the sql server....
edit:
Parameters for Findset:
findset(true, false); If you want to modify the records
findset(true, true); if you want to modify fields of the PK0 -
kine wrote:And is supported from version 4.00SP1, if you are on NAV 4.00 w/o SP, you will not see the commands in the F5 menu. Check the client version in About dialog.
About Box says Version W1 4.0 SP1 (4.0)
and when i press F5->Record->miscellaneous->I dont see FINDSET in the List :shock:Regards,
GD0 -
gulamdastagir wrote:kine wrote:And is supported from version 4.00SP1, if you are on NAV 4.00 w/o SP, you will not see the commands in the F5 menu. Check the client version in About dialog.
About Box says Version W1 4.0 SP1 (4.0)
and when i press F5->Record->miscellaneous->I dont see FINDSET in the List :shock:
Yes, because you are using W1 4.0 SP1 database opened with NAV 4.00 w/o SP...
0 -
No that is definately not true. It depends on what you want to do.JoeK wrote:Findset ist the same as find('-')
With FINDSET you intend to get a set of records, and with the parameters you can specify what you are going to do with those records.
FIND('-') is also used to get only the first record, for which you should now use FINDFIRST.
FIND('-') is also used to check whether records exist at all within the filtered values, for which it is better to use ISEMPTY.0 -
I also get the impression from the help file that FINDFIRST is more optimal but only if you intend to FINDFIRST and not USE NEXT.
However if you intend to do something like IF FIND('-') THEN REPEAT UNTIL NEXT = 0....
then you should never use FINDFIRST here.
Have I got that right or am I wrong? I am basing this guess on the help file saying "This function should be used instead of FIND('-') when you only need the first record."0 -
New commands:
FINDSET: for getting multiple records, you intend to loop through them
FINDFIRST: for getting only the first record in the filter, just one record
FINDLAST: for getting only the last record in the filter, just one record
When you only want to know if records exist at all, when you don't need any field values from any records, you should use ISEMPTY
So the key to your question iswhen you only need the first record0 -
DenSter wrote:New commands:
FINDSET: for getting multiple records, you intend to loop through them
FINDFIRST: for getting only the first record in the filter, just one record
FINDLAST: for getting only the last record in the filter, just one record
Hi DenSter,
I want to ask whether FIND or FIND('=') is same with FINDFIRST?
If it's different, what is the different?
Thank you.Best regards,
Johanna0 -
no, they are different:
if you check the F1 help of nav you will find that
FIND('=') is more similar to GET function: the difference between those 2 is that GET ignores any filter applied to the set.Finds a record in a C/SIDE table based on the values stored in keys.
Ok := Record.FIND([Which])
Parameters
Record
Type: Record
On input, Record identifies the record that you want to find. On output, the following possibilities exist:
If the record was found, then the record is returned in the Record parameter and any FlowFields in the record are set to zero. You must update the FlowFields using the CALCFIELDS Function (RECORD).
If the record was not found and if you omitted the return value, a runtime error occurs.
Which
Type: Text or code
Specifies how to perform the search. The table is searched until either a record is found or there are no more records. Each character in this string can be present only once. You can combine the '=', '<', and '>' characters. You can use the following characters:
= to search for a record that equals the key values (default)
> to search for a record that is larger than the key values
< to search for a record that is less than the key values
+ to search for the last record in the table (+ can only be used alone)
- tosearch for the first record in the table (- can only be used alone)
If this parameter contains '=', '>' or '<', then you must assign value to all fields of the current and primary keys before you call FIND.0 -
DenSter wrote:
No that is definately not true. It depends on what you want to do.JoeK wrote:Findset ist the same as find('-')
With FINDSET you intend to get a set of records, and with the parameters you can specify what you are going to do with those records.
FIND('-') is also used to get only the first record, for which you should now use FINDFIRST.
FIND('-') is also used to check whether records exist at all within the filtered values, for which it is better to use ISEMPTY.
You could also use FIND('-') for multiple records when you use ASCENDING(FALSE), this will not work with a FINDSET.0 -
FINDSET(FALSE,FALSE)- read-only. This uses no server cursors and the record set is read with a single server call.
FINDSET(TRUE,FALSE) - This is used to update non-key fields. This uses a cursor with a fetch buffer similar to FIND(‘-’).
FINDSET(TRUE,TRUE) - This is used to update key fields.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

