Back

How to use Selections with related tables like Ledger Entries, Unit of Measures, etc.

How to use advanced filters
Video 7/11
Play
Close
  • Helpful
  • Not helpful
  • Needs update
  • Technical error
An advanced video is for the experts, and it requires detailed knowledge about the specific area of Business Central. Advanced Watch "the details", if you need detailed knowledge about a specific topic. These videos are only relevant for particular users. The Details This video includes functionality from the app "Flexible Forecast" which is available at Microsoft AppSource. Click to visit AppSource. Flexible Forecast

Playlists  Manage

Log in to create a playlist or see your existing playlists.

Presenter: Sune Lohse, Chief Strategy Officer

This is what happens in the video

Flexible forecast in Business Central lets you select items based on data in related tables, not just the item card itself. This means you can filter items by criteria like cost amount actual, units sold, or unit of measure, and have the forecast show only the items that match.

You build the selection by pointing to a source table, applying a filter on a field in that table, and then mapping a field from the source table to the primary key of the item table. For example, you can map the item number in the Item Ledger Entry table (table 32) to the item number field (field 1) in the item table.

A practical use is filtering on cost amount actual in the Item Ledger Entry table. You set the filter to show only items where the cost amount actual is above a value such as 40,000, and the forecast lists exactly those items.

What flexible forecast selection does

With flexible forecast, you can make selections on items based on an underlying table or a related table, rather than only on the fields found directly on the item. That opens up filtering possibilities that go well beyond the standard item attributes.

Say you want to find all items that have a cost amount actual higher than a certain threshold. The cost amount actual lives on the item ledger entries, which sit underneath the item. By filtering on that related table, you can pull every item that matches and bring it straight into your forecast.

How to build a selection on a related table

Start by creating a new selection in the forecast. Give it a descriptive name, for example “Cost amount”, and define it as an automatic selection.

Next, set the source table. In this case the source is the Item Ledger Entry table, which is table number 32. You can search for it from the item, browse the list, or enter the table number directly if you already know it.

Then add the filter you want to apply. On the first line, filter on the field cost amount actual in the Item Ledger Entry table. Set it to greater than 40,000, just like a normal filter.

Finally, you need at least one line with a destination field mapping. This connects the source table to the item table. Map the item number field from the Item Ledger Entry table so it equals the primary key in the destination table, which is field number 1, the item number.

Once that mapping is in place, the selection is complete. Update the forecast, and it shows only the items with a cost amount actual above 40,000.

Other ways to use related table selections

The same approach works for any relation you can build through an underlying table. You can make a selection for all items that have a unit of measure of pallet, or any other criterion that lives in a related table. The pattern stays the same: pick the source table, apply your filter, and map the field back to the item number.

Q&A

What is flexible forecast in Business Central?

Flexible forecast lets you select items for a forecast based on data in an underlying or related table, not only on fields found directly on the item. This makes it possible to filter items by criteria stored elsewhere, such as cost amount actual or unit of measure.

How do I filter forecast items by cost amount actual?

Create a new automatic selection, set the source table to the Item Ledger Entry table (table 32), add a filter on the cost amount actual field (for example greater than 40,000), and map the item number from the source table to field 1 (the item number) in the item table.

What table number is the Item Ledger Entry?

The Item Ledger Entry is table number 32 in Business Central. You can also search for it from the item or browse the table list.

Why do I need a destination field mapping?

The destination field mapping connects the source table to the item table. You map the item number field in the source table so it equals the primary key in the item table, which is field number 1. Without this mapping, the selection cannot tie the filtered records back to the right items.

Can I filter forecast items by unit of measure?

Yes. The same method works for any related table criterion. You can build a selection for all items that have a unit of measure such as pallet, using the same steps of choosing the source table, applying a filter, and mapping back to the item number.

475012187-jzNjkWbFbi4-ENG20090453