Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Filtering Data in a Temporary Table Based on Document Type in a Worksheet Page

(1) ShareShare
ReportReport
Posted on by 29

Hi everyone,

I am developing a worksheet page in Dynamics 365 Business Central. You can refer to the snapshot of the page below for reference. Here's the functionality I aim to achieve:

  1. In the Roll Center, there is a Cue Group. When I click on a cue, it opens this worksheet page with data related to a specific sales person.

  2. This worksheet page includes a list that shows:

    • Quotes and Orders (from the Sales Header table).
    • Invoices (from the Customer Ledger Entry table).
  3. To achieve this, I am using a temporary table to consolidate data from these two sources.

Problem:

There is a field in the worksheet called Document Type with four options:

  • All
  • Quote
  • Order
  • Invoice

I want the list to dynamically filter the data based on the selected Document Type. For example:

  • If "Order" is selected, only Orders should be displayed in the list.
  • If "All" is selected, all data (Quotes, Orders, and Invoices) should be displayed.

My Questions:

  1. Is it possible to set a filter on a temporary table dynamically to achieve this behavior?
  2. Is this approach (using a temporary table to combine data from two different tables) the best practice?
  3. If not, what would be a better approach to implement this functionality?

Any suggestions or code samples would be greatly appreciated!

Thank you in advance!

  • CU09100938-0 Profile Picture
    CU09100938-0 6 on at
    Filtering Data in a Temporary Table Based on Document Type in a Worksheet Page
    Thanks for the link.
  • gdrenteria Profile Picture
    gdrenteria 12,750 Most Valuable Professional on at
    Filtering Data in a Temporary Table Based on Document Type in a Worksheet Page

    Hi, good day
    I hope this can help you, and give you some hints.

    Filtering on a temporary table

    Solved: AL: Get Selected Rows from List of Temp Table

    To join information from two tables you could use a query. Dynamics 365 Business Central: Using the query as a data source for a page (Query.Open Method) | Dynamics 365 Lab

    Best Regards
    Gerardo

  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 5,371 on at
    Filtering Data in a Temporary Table Based on Document Type in a Worksheet Page

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,458 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,543 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans