Hi
Below is the code. Accountname,AccountValue has Dimensions = 10
AccountName is Text , AccountValue is Decimal. Secondly i have defined found as Text . What i need to change if i define it as Boolean.
G/L Entry - OnAfterGetRecord() Ctr := 0; WHILE Ctr <= 9 DO BEGIN IF GLEntry."G/L Account Name" = AccountName[Ctr] THEN BEGIN AccountValue[Ctr] += GLEntry.Amount; found := 'TRUE'; END; Ctr := Ctr + 1; END; IF found = 'False' THEN BEGIN AccountName[g_ctr] := GLEntry."G/L Account Name"; AccountValue[g_ctr] := GLEntry.Amount; g_ctr := g_ctr + 1; END;
Thanks
*This post is locked for comments
Hello,
as we suggested assign
Ctr := 1;
try
Ctr := 1;
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156