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)

Syntax

(0) ShareShare
ReportReport
Posted on by

Just  a quick one, what's casuing the syntax error in this ELSE Statement?

I can't seem to figure it out.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at
    RE: Syntax

    Hi,

    Your screenshot has not been attached properly. Attach again please?

  • Suggested answer
    Alexander Ermakov Profile Picture
    28,096 on at
    RE: Syntax

    The image you attached is not available, can you reupload that?

  • Community Member Profile Picture
    on at
    RE: Syntax

    51.PNG

  • Verified answer
    keoma Profile Picture
    32,729 on at
    RE: Syntax

    there are more than 1 line between THEN and ELSE.

    so add a BEGIN after THEN and a END before ELSE.

    if condition then begin

    line 1;

    line 2;

    ...

    end else

    line 1;

    every line has to end with a semicolon in that case.

  • Verified answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at
    RE: Syntax

    2251.51.PNG

    Hi,

    Wrap your code within a BEGIN .. END code and you will be fine.

  • Community Member Profile Picture
    on at
    RE: Syntax

    Thank you!

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans