web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

How to fetch data from multiple form to one form using al for 365 business central ?

(1) ShareShare
ReportReport
Posted on by 339

Dear experts

How to fetch data from multiple form to one form using al for 365 business central ?

  • SABIH Profile Picture
    339 on at

    finally Solution is  below

    first should be create query of respective tables

    query syntax is below

    table1

    query 5010 queryname(respective table name )

    {

       QueryType = Normal;

       Caption = 'query name ';

       elements

       {

           dataitem("tablename"; "tablename")

           {

               column("fieldname"; "fieldvalue") { }

    }

    }

    }

    table 2

    query 5011 queryname(respective table name )

    {

       QueryType = Normal;

       Caption = 'query name ';

       elements

       {

           dataitem("tablename"; "tablename")

           {

               column("fieldname"; "fieldvalue") { }

    }

    }

    }

    then pass the function to respective page syntax is below

    local procedure procedurename()

       var

           variable1: Query table1;

           variable2: Query table2;

           variablecurrentpage: Record current page ;

       begin

    variable2.setfilter('fieldof variable2','current page.filed');

    variable1.setfilter('fieldof variable1','current page.filed')

    variable1.open();

    while variable1.Read do begin

               while variable2.Read do begin

    variablecurrentpage.SetFilter(fields,fields)

    variablecurrentpage.init();

    variablecurrentpage.field :=variable1.field ;

    variablecurrentpage.insert()

    end;

    end;

    end;

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans