# Make one field in a form equal another field

**URL:** https://www.dynamicsuser.net/t/make-one-field-in-a-form-equal-another-field/42125
**Category:** Developer Forum
**Created:** [December 7, 2012, 1:51pm UTC](https://www.dynamicsuser.net/t/make-one-field-in-a-form-equal-another-field/42125 "2012-12-07T13:51:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Marcs4068](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@Marcs4068](https://www.dynamicsuser.net/u/Marcs4068)
#### Post date: [December 7, 2012, 1:51pm UTC](https://www.dynamicsuser.net/t/make-one-field-in-a-form-equal-another-field/42125/1 "2012-12-07T13:51:59Z")

</div>

Hello everyone,

I am very new to Dynamics AX and I feel pretty lost right now. I have a form that holds to name fields. They contain the same information, so instead of have someone type the name in twice I am wanting to populate the second field when the first field in inputed.

I believe it would be as simple as smmBusRelTable.NameAlias = smmBusRelTable.Name. But I’m new at using methods. I put everything in a project to work on it and I was trying to create a method to the form itself on the NameAlias field. I’m pretty sure I would have to use a gotfocus command first.

Can anyone help me out with this. I know it’s pretty basic I’m sure.

Thanks

---

<div class="post-metadata">

### Author: ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)
#### Post date: [December 7, 2012, 3:23pm UTC](https://www.dynamicsuser.net/t/make-one-field-in-a-form-equal-another-field/42125/2 "2012-12-07T15:23:32Z")

</div>

If you want to implement it for all forms, update the field in modifiedField() method on smmBusRelTable table. Otherwise just do it in smmBusRelTable datasource of your form - expand datasource fields, then Name, right-click Methods, Override Method \> modified.

---

<div class="post-metadata">

### Author: ![Marcs4068](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@Marcs4068](https://www.dynamicsuser.net/u/Marcs4068)
#### Post date: [December 7, 2012, 4:44pm UTC](https://www.dynamicsuser.net/t/make-one-field-in-a-form-equal-another-field/42125/3 "2012-12-07T16:44:29Z")

</div>

Martin,

Thanks for the reply. I did end up making the change in the modifiedField() on the table. It worked great.

Thanks again.
