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 AX (Archived)

Shall we use "Field Fixed" and "Related field fixed" relation both in same table?

(0) ShareShare
ReportReport
Posted on by 30

Dear All,

Shall we use "Field Fixed" and "Related field fixed" relation both in same table?

Please give me more shed on this.

Thanks!

Arpan

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Arpan,

    It doesn't sound like a common scenario. Do you have an example where and how you want to use this?

  • Suggested answer
    Fedir Kryvyi Profile Picture
    1,026 on at

    The best answer would be it depends.

    Could you provide a description of your scenario? I can think of two tables both having some sort of status field and scenario where you need to join only when records from table1 in status1 and table2 status2, So ypu will have something like:

    table1.Status = Status1

    table1.RefRecId = table2.RecId

    table2.Status = status2

    But that is only my wild guess, usually everything s a less complex :)

  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Technically you will not receive any error by having two conditional table relationships on the same table. Field Fixed relation restricts the records selected in the primary table and Related Field Fixed relationship restricts the records selected in the related table. Can you let us know the reason behind choosing such design.

    Refer following links to get some more details:

    (Conditional Table Relations [AX 2012])

    https://msdn.microsoft.com/en-us/library/bb190115.aspx

    (Related Field Fixed Relation)

    https://community.dynamics.com/ax/b/poojakarkiblogforax/archive/2014/02/25/related-field-fixed-relation

  • @rp@n Profile Picture
    30 on at

    Thanks Fedir,

    Sure, i will give first example Relation : Field Fixed 

    I am creating 3 Tables :

    1. Player
    2. Footballer
    3. Cricketer

    I am creating 2 BaseEnums :

    1. PlayerType
    2. PlayerCategory

    Base enum : PlayerType :

    a8.jpg

    Base enum : PlayerCategory :

    4863.a2.jpg

    Table:  Player

    Fields: PalyerName (String), Player Code(String), Player Type(Base enum)

    Base enum: PalyerType : Footballer, Cricketer

    8765.a3.jpg

    Table: Footballer

    Fields: FootballerCode (String), Salary(Real), Player Category (Base enum)

    8030.a4.jpg

    Table: Cricketer

    Fields: CricketerCode ( String), Salary (Real), Player Category (Base enum)

    8561.a5.jpg

    Now fill some data in to Footballer and Cricketer tables aswell:

    Footballer Table:

    a6.jpg

    Cricketer Table :

    a7.jpg

    Scenario:

    Now For Player Table:

    If we select Player Type = Footballer then on “PlayerCode” field on the Player Table ,lookup should be open showing the records of footballer only and similarly with the case of cricketer.
    For this to achieve we can use the relation called ‘Fixed field’ to do this.

    Relation: Field Fixed
    So, go to the Player table under relation node and create a field fixed relation:

    a8.jpg

    Base enum 0 = Footballer
    Now create a new record in Player Table:
    It’s only showing lookup of Footballer code which having Player type = Footballer.

    a9.jpg

    Base enum 1 = Cricketer

    Then create another relation for Table Cricketer
    a10.jpg

    a11.jpg

    It’s only showing lookup of Cricketer code which having Player type = Cricketer.

    Kindly let me know above process for Field Fixed is correct ?

    Later i will post Related Field Fixed***

    Please give me more shed on this.

    Thanks!

    Arpan

  • Verified answer
    Fedir Kryvyi Profile Picture
    1,026 on at

    Arpan,

    Thanks that is valid example and it looks as what I was describing.

    But...the thing is that instead of having 3 tables, you can have only two of them

    "Player" and "Player details"

    Player would contain Name, Type + Reference to PlayerDetails(There is no need to store Code if it is already present on Footballer or Cricketer tables)

    Player details - combines data fro Footballers and Cricketers from your exampl and also has player type field

    So you will have

    Player:

    -Name

    -Type

    -PlayerDetailsRefRecId

    PlayerDetails

    -PlayerCategory

    -Salary

    -Name

    -PlayerType

    And one relation by RecId and Type

    By the way, it is probably not the best example, because you were using famous players as an example, an I doubt that Pele can play Cricket, so probably you would end up with one table containing all fields(but this is from a "business scenario" point of view).

    So I would say - is it possible?: Yes. Can it be done in different way? Probably

    I have scenario in mind that might make more sense - Lets say that Footballer and Cricketer have some similar fields(Code, Type, Salary) but some other fields that are specific only for Footballer or Cricketer. In this case we can separate data in two tables and use combination of "Field fixed" - "Related field fixed" might make some sense, but it is easier to have one table as I described and handle differences in fields by having table inheritance(although I don't really like it)

  • Verified answer
    Mahmoud Hakim Profile Picture
    17,887 on at

    you can do that without any issues

  • @rp@n Profile Picture
    30 on at

    Hi Hakim,

    You mean to say i can use both (Field Fixed + Related Field Fixed) on same table at a time.  If required ?

    Please give me more shed on this.

    Thanks!

    Arpan

  • Verified answer
    Mahmoud Hakim Profile Picture
    17,887 on at

    yes, you can do that easily as a developing wise , but you must make strong analysis business to achieve this relation.

    but as a technical wise, just right click and add relation without any issues

  • @rp@n Profile Picture
    30 on at

    Thanks Hakim,

    Based on my above post "Field Fixed" , i am going to continue with the same table for "Related Field Fixed"

    a31.jpg

    Player Category : A, B. C (0,1,2)

    a21.jpg

    Here we mentioned Player category = 1 means Category B
    It’s showing lookup of Footballer which having Player category = B

    Go to Footballer table and create a few records :

    a22.jpg

    In Player Table, Player code lookup it should show only F002, F004

    Go to Player Table:

    a23.jpg

    Same like Cricketer Table

    a25.jpg

    a27.jpg

    Here we mentioned Player category = 2 means Category C
    It’s showing lookup of Cricketer which having Player category = C

    Go to Cricketer Table and create some records :

    a29.jpg

    Go to Player Table

    In Player Table, Player code lookup it should show only C003, C005, C006

    a31.jpg

    Kindly verify the above process is correct?

    Please give me more shed on this.

    Thanks!

    Arpan

  • Verified answer
    Mahmoud Hakim Profile Picture
    17,887 on at

    this scenario is correct from technical side, no problem based on your requirements

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 AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans