Hello,
I need to filter a column for a specific vendor when a vendor has been selected from another table.
The supplier is entered from another table "Purchase header".
How do I filter the Vendor Number column in the Purchase Line table? I tried various ways nothing helps. Code Units/extension of tables and pages
Hi,
If you want to filter the Vendor column in Purchase Line table based on the selected vendor in Purchase Header table, you can use the SetFilter method in AL like this
YourCurrentRecord.SetFilter("Vendor No.", '=%1', PurchaseHeaderTable."Buy-from Vendor No.");
This code sets a filter on the Vendor column using = operator and vendor no. selected in Purchase Header table, you can also use SetRange and other filter methods as well.. check out this documentation for more information learn.microsoft.com/.../record-setfilter-method & learn.microsoft.com/.../record-setrange-method
I hope this helps!
Regards
I figured it out. you need to set a filter in the table extension
trigger OnValidate()
begin
SETFILTER("Vendor No.", "Buy-from Vendor No.");
end;
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,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156