web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    RE: code to get modulo of division by 50

    Hi

    Have a look at MOD function in NAV.

  • Verified answer
    Mohana Yadav Profile Picture
    60,969 Super User 2025 Season 2 on at
    RE: code to get modulo of division by 50

    check this

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

  • Verified answer
    Binesh Profile Picture
    7,885 on at
    RE: code to get modulo of division by 50

    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
    RE: code to get modulo of division by 50

    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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#3
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans