Is there a tutorial on how to display Query results in a list page? I came across this post by Mark Brummel about using SourceTableTemporary, but it's all written in C/AL.
https://dynamicsuser.net/nav/b/mark_brummel/posts/tip-35-using-queries-in-pages-amp-reports
Thanks!
I have followed everything that you have published but It has been impossible for me to display results in a page, Query works wonderful but when I tried to display my page, shows nothing, not an error.
If I debug my procedure to see if I'm getting info to populate my page, It shows perfectly but I'm unable to show data in the page.
I was wondering if data type must be same for query definition, temporary table and page structure?
for example, I have vendor id, should I use code[20] as data type or may I use text[20]? I think this can be causing my issues.
TIA!
Brief example.
Create a new table to hold your query.
Create a new page to show your query. Source to be the created table but as temporary.
You’ll then need a function to fill the page/run your query and add the results.
Kind of like this
page 50000 "Query in a page”
{
PageType = List;
ApplicationArea = All;
UsageCategory = Administration;
SourceTable = "Query Table";
SourceTableTemporary = true;
Editable = false;
DeleteAllowed = false;
InsertAllowed = false;
layout
{
area(Content)
{
repeater(Control1)
{
field("Query field 1 Code"; "Query Field 1 Code")
Procedure SetPageData()
Var
Myquery: query MyQuery
Begin
while MyQuery.Read() do begin
NextRowNo := NextRowNo + 1;
"Entry No." := NextRowNo;
"Query Field 1 Code" := Myquery.Journal_Template_Name;
Insert();
End;
Hi Stefano, do you have an example of how this is done in Visual Studio with AL? I'm trying to build a list page that shows jobs by customer but uses the Customer name from the Customer table and not the bill-to customer no. in the Jobs table. I have a simple query that returns the data I want to display but I can't find a way to then build this in to a list page.
PS have your D365 BC Development Quick Start Guide beside me as I'm learning this - well done!
You can do the same in AL.
André Arnaud de Cal...
292,031
Super User 2025 Season 1
Martin Dráb
230,868
Most Valuable Professional
nmaenpaa
101,156