Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error ')' is missing in Table Relation

(0) ShareShare
ReportReport
Posted on by 3,051

Hi

  Below code is giving above error

"Dimension Value".Code WHERE (Dimension Code=CONST(Sub-CENTER) and bCode=CONST(1))

Secondly i also want to add condition that Location Code should also be equal to User Location Code in User Setup.

Thanks

*This post is locked for comments

  • mmv Profile Picture
    mmv 11,467 on at
    RE: Error ')' is missing in Table Relation

    Yes, you have to define lvRecUserSetup.

    For displaying the Dimension values based on Branch,  You need to write the same code as mentioned above, instead of Location Code, you need to use "Branch".

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 44,656 on at
    RE: Error ')' is missing in Table Relation

    What are dataitems in the report ? On the dataitem where shortcut dimension code field is there add the code in the onPreDataItem trigger by getting lvRecUserSetup.GET(USERID) and then applying SETFILTER using the branch value.

  • jsshivalik Profile Picture
    jsshivalik 3,051 on at
    RE: Error ')' is missing in Table Relation

    Hi

     U mean to say in Ca; Globals i have to give lvRecUserSetup Datatype as record.

    Thanks

  • jsshivalik Profile Picture
    jsshivalik 3,051 on at
    RE: Error ')' is missing in Table Relation

    Hi

       I have written this on Request Page Field in Table Relation. What Is CONST. What is difference between Filter and Constant. It is displaying correct Data but it is displaying list of all Branches.

    Field is of Boolean Type.

    Can u pls help on one more issue . I want only those records should be displayed whose Shortcut Dimension Value1 value should be equal to UserSetup Branch Field.

    Thanks

  • Verified answer
    mmv Profile Picture
    mmv 11,467 on at
    RE: Error ')' is missing in Table Relation

    lvRecDimValue.SETRANGE("Dimension Code",'SUB-CENTER');

    lvRecDimValue.SETRANGE(bCode,1);

    IF lvRecUserSetup.GET(USERID) THEN

     lvRecDimValue.SETRANGE("Location Code",lvRecUserSetup."Location Code");  

    lvDimValues.LOOKUPMODE := TRUE;

    lvDimValues.SETTABLEVIEW(lvDimValues);

    IF lvDimValues.RUNMODAL = ACTION::LookupOK THEN BEGIN

     lvDimValues.GETRECORD(lvRecDimValue);

     lvSelectedValue := lvRecDimValue.Code;

    END;

    in the above code,

    lvRecUserSetup is a table variable of "User Setup"

    lvRecDimValue is a table variable of "Dimension Value"

    lvDimValues is a page variable of "Dimension Values"

    and lvSelectedValue is a variable of Code 20.

    hope this helps you.

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 44,656 on at
    RE: Error ')' is missing in Table Relation

    "Dimension Value".Code WHERE (Dimension Code=CONST(SUB-CENTER),Code=CONST(1)), there should be no and how did you get the above code and where you added that ?

  • jsshivalik Profile Picture
    jsshivalik 3,051 on at
    RE: Error ')' is missing in Table Relation

    Yes. I want that User Location in User Setu should be equal to Dimension Value Table Location Code.

    Thanks

  • mmv Profile Picture
    mmv 11,467 on at
    RE: Error ')' is missing in Table Relation

    Do you have a "Location Code" in your "Dimension Value" table?

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 60,161 Super User 2025 Season 1 on at
    RE: Error ')' is missing in Table Relation

    please try and let us know if you are facing any issues.

    please dont expect complete code from forum

  • jsshivalik Profile Picture
    jsshivalik 3,051 on at
    RE: Error ')' is missing in Table Relation

    Hi

     What should be the code

    Thanks

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,399 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans