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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

want to calculate the percentage  using x++

(0) ShareShare
ReportReport
Posted on by 142

4010.Capturenew.PNG

I have

field  (Gross Pay)

field   (Percentage)  

field  (Amount)

I want to calculate the percentage in c= a*b/100

store value in the field Amount

I have the same question (0)
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    All right, and what's the problem?

    By the way, I've moved your question from Dynamics AX Forum to Dynamics 365 Finance Forum and changed the category from Administration and Setup to Development / Customization / SDK. Please pay more attention to it next time.

  • zyir Profile Picture
    142 on at

    Thank You for the Help

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Does it mean that you've already solved the problem by yourself?

    If not, please tell us what problem you have with the implementation.

  • zyir Profile Picture
    142 on at

    No, I haven't got a fix yet,

    I will be glad if anyone can help out.

    Thanks in advance.

  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Fine, but what's the problem? It's difficult to address your problem if you don't tell us what it is.

    The mathematical operators in X are exactly the same as in your example, therefore c= a*b/100 is actually valid X code.

    Does it mean that you don't know how to refer to a table field? It's simple - you need a variable containing a table buffer, then a dot ('.') and then a field name. For example:

    this.Amount = this.GrossPay * this.Percentage / 100;

  • zyir Profile Picture
    142 on at

    Yes, I didn't know how t refer to the table field.

    Thank you @Martin Dráb for the help, problem solved.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans