Hi Guys,
I am trying to do setrange, but my 'Primary Key Field 2 No.' is Integer data type and Data type of 'No.' is Code.
How to convert code to integer data type?
Please let me know is there is any way to do this.
I think you are using the wrong field for filtering. Try using "Primary Key Field 2 Value".
ChangeLogEntry.SetRange("Primary Key Field 2 Value", Rec."No.");
You are doing incorrect setrange - The Field Primary Key Field 2 No. stores the field no. of the table whose record is stored. You should be doing two setrange-
1. Primary Key Field 2 No. --> Field No. in Table.
2. Primary Key Field 2 Value --> Value that you want to filter (Rec."No.").
excuse me
don't understand?
what table is your Rec referring to?
in the 'Primary Key Field 2 No.' field of the change log is the field ID entered? what does your Rec.No refer to?
maybe the logic you are using is not quite right?
Anyway, to convert a code to an integer use the function
EVALUATE(varInteger,VarCode) function;
but in your case you can do a setfilte(yourfilterfield,'%1',rec.no);
DAniele
Hi, Prathama Deshpande.
you can also use the SetFilter,
ChangeLogentry.SetFilter("Primary Key Field 2 No.", '=%1', Rec."No.");
Regards
You idea is wrong to filter the data, you need to change your logic, or brief your requirement here.
Thanks.
Please use Evaluate function
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156