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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Query calculations

(0) ShareShare
ReportReport
Posted on by 103

Can I calculate a "new column" with a value from another column that  has been feched with a query object?

I have a Currency factor that I have to calculate as 1/Currency Factor and show this value instead of Currency Factor, is there any way to achive this in a Query Object?

TIA! 

I have the same question (0)
  • Suggested answer
    Vaishnavi J Profile Picture
    3,096 on at

    Hi

    Yes you can create a query object with a field. .

    and then go to page where you want to show the query object value.

    in trigger onaftergetrecord of the page right the below logic

    trigger OnAfterGetRecord

     var

           Query_Customer: Query BLL_QUERY_CUSTOMER;

    begin

          Clear(Query_Customer);

           if Query_Customer.Open() then

               if Query_Customer.Read() then

                   CustomerCount := Query_Customer.CountUnique; // assign your field value  Calculatedfieldvalue :=1/ Query_Customer.Amount;

           Query_Customer.Close();

    end;

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 649 Super User 2026 Season 1

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 447 Most Valuable Professional

#3
YUN ZHU Profile Picture

YUN ZHU 388 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans