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)

Error ')' is missing in Table Relation

(0) ShareShare
ReportReport
Posted on by 3,099

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

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,967 Super User 2025 Season 2 on at
    RE: Error ')' is missing in Table Relation

    then you need to remove tablerelation and write code in OnLookup trigger to check location code from user Setup.

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

    Hi

     What should be the code

    Thanks

  • Suggested answer
    Mohana Yadav Profile Picture
    60,967 Super User 2025 Season 2 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

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

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

  • jsshivalik Profile Picture
    3,099 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

  • Verified answer
    Suresh Kulla Profile Picture
    50,233 Super User 2025 Season 2 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 ?

  • Verified answer
    mmv Profile Picture
    11,471 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.

  • jsshivalik Profile Picture
    3,099 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

  • jsshivalik Profile Picture
    3,099 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

  • Suggested answer
    Suresh Kulla Profile Picture
    50,233 Super User 2025 Season 2 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.

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

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans