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 :
Microsoft Dynamics NAV (Archived)

code to get modulo of division by 50

(0) ShareShare
ReportReport
Posted on by 428

Hi All,

I am trying to do a validation, where I want to check the value entered by user is multiplication of 50 or not.

Ex, if user enters 151, we need to calculate if mode(151,50)=0 ?.

Here Mode(151,50)=1.

How this can be done in NAV Codes?.

MS NAV 2013 R2.

Regards,

Abdul

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rajasekhar@MS Profile Picture
    5,569 on at

    Hi

    Have a look at MOD function in NAV.

  • Verified answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    check this

    forum.mibuso.com/.../how-to-use-div-and-mod

  • Verified answer
    Binesh Profile Picture
    7,885 on at

    Hello,

    IF EnteredValue MOD 50 = 0 THEN
         MESSAGE('Mode value is zero') //Do what you want
    ELSE
         MESSAGE('Mode value is not zero');// Do else stmt if need

    Here EnteredValue is a integer variable.

  • AbduTeeyech Profile Picture
    428 on at

    So the MOD is the operator.

    Ok fine, thanks all.

    Abdul

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans