I would like to know what Reference group is all about.
I know Reference groups used for populating look ups but we still have different way to pursue it.
What is the specific use of Reference Group which makes it unique from other.
*This post is locked for comments
Hi Andre, Is there anyway I can get the table id where the field Project manager is coming from?
I have uploaded a video regarding different uses of reference group.
Reference Group in AX 2012
Use of Surrogate key to implement reference group in AX 2012
Table of Contents
1 Overview
2 Reference group
3
This document provides all step required to implement reference group using surrogate key.
In AX 2012, Table relations are based on Surrogate key i.e. Rec-id. With this change, reference group is introduced on AX-forms to display as well as filter records from related table. To know more about Reference group, please go through link:
Let’s take example to explain & implement it using below steps:
Consider two tables: ParentTable, ChildTable
Parent table |
|
Child table |
|
|
|
ParentId |
|
ChildId |
ParentName |
|
ChildName |
ParentCity |
|
ChildCity |
|
|
ParentTable (RecId) |
Primary index and cluster index is set as Surrogate key for both tables. Primary key based relation is created on child table. Following Indexes are created and Replacement key for parent table is set as ‘ParentIdx’.
New form is created ‘Child table’, In DataSource node added ‘child table’ and in Reference data source node added ‘Parent table’.
Expand design node, drag and drop fields from child table and parent table. Create one reference group filed and provide below properties.
Under reference group, ParentId will be shown. This behaviour is the result of replacement key of parent table.
Replacement key updates the AutoIdentification field group of table.
Open form, try to create record for child table. Though relation is based on surrogate key selection is provided for ParentId of parent table as shown in figure. On selection related attributes of parent table are shown and available to filter records as well.
Thanks Martin for your Patience......
I resolved that issue.....
Many thanks to you.............
I still have the same question as before.
You demonstrate one Example in your blog on Replacement Groups.
My Questions is, Is there any alternate method to do the same Example of yours?
It's a part of my R&D.
What and why would you like to do differently? What problem do you want to solve by the theoretical alternate method?
I did the same thing which you specified in the Note, surrogate key as primary key and EmplId as alternate key, ReferenceGroup Control present in Form & when you add it, you have ReplacementFieldGroup property associated with it, here we can select table field groups( AutoIndentification & manually Created Field Groups).
So, Instead of creating like this, Is there any alternate method to populate Replacement keys on Foreign key Table?
hope you got my question
Sorry, it's not clear to me what your problem is. You described how you created a reference group by dragging a field, which is exactly the same approach as used in my article. Then you talk about selecting ReplacementFieldGroup, but it's not clear what problem you have with doing the same with your newly created reference group.
Note that I would expect you to have the surrogate key as the primary key and EmplId as the alternate key. Having an alternate key the same as the primary one doesn't make much sense to me.
(By the way, you should use the worker table in any real implementation, instead of creating a new table with the same purpose.)
Hi Martin,
One Small doubt that has to be clarified and I will demonstrate with an example.
I created two tables e.g., BaseTable & DerivedTable, the fields in BaseTable(EmpId, Name, DOB) and in Derived Table(TotalHourWorked, TotalAmountCharged).
EmpId is primary key in BaseTable, in table properties, I assign Replacement Key = PrimaryIdx (Alternate key = Yes in Index properties of BaseTable).
In DerivedTable, I created Foreign key (Primary key based) based Relation, It added the BaseTable field with same name as Table Name which of type Int64, till here, It's OK but when I dragged this field in form-> Design->Designs node, It became type of Reference Group (I am not Emphasizing on contents of Form)
My questions is, Can't I get this same feature as simple as same above in another way?
You did this same thing in your post in more simpler way by just selecting ReplacementFieldGroup.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,275 Most Valuable Professional
nmaenpaa 101,156