Use of SETCURRENTKEY

upasanisandip
upasanisandip Member Posts: 405
Hi,
Can anyone tell me what is wrong in following code?
Use of SETCURRENTKEY

VarRatio.RESET;
VarRatio.SETCURRENTKEY(Ratio);
VarRatio.SETFILTER(VarRatio.Ratio,'<>A');

IF VarRatio.FIND('-') THEN
BEGIN
Flex1.Rows:= VarRatio.COUNT +10;
END;
Not getting the sort order on "Ratio" field

thanks.

Comments

  • DenSter
    DenSter Member Posts: 8,307
    The table has to have a key with that field. NAV can only sort using existing keys.
  • gulamdastagir
    gulamdastagir Member Posts: 411
    Create a key called "ratio" in the table referred to by the record variable "varRatio".

    SETCURRENTKEY will sort "varRatio" by the key "ratio" now .
    Regards,

    GD