hi guys,im new to ax..

i have the two grids,AccntNum field in one grid and dept no ,address in another grid…,when i entered customer acno in AccntNum filed the releated customer address will be automatically displayed in the address field of second grid could you plz tell me how to do this

Just give the join source property of the parent table to the child datasource.

thanx 4 ur rply lalit!!

i mean to say if i entered AccountNum as 1101 in the first grid then the related (1101) customer address will be appear in the second grid of address field. i think only by aplying join property the lookup will be appear,but i just want whose ever i entered the AccountNum that customer address will automatically displayed how to do that in which method i can write the code…plz give the rply

It depends on your form design. Can you please elaborate on the form design(expected), the tables you are trying to use in the form?

Please Try to provide a meaningful title to the Post, so that it cannot be ignored

I have the two tables as cust and dept with fieldsAccountNum(cust),Address,deptNum(dept)
2)drag and drop the two tables in the form as datasources (cust,dept)
3)Drag and drop the AccountNum field directly in the Design node then
4)Take the two grids
one grid for AccountNum
second grid for Address and deptNum
if i can enter the AccountNum(1101) in the Label then the related customer(1101) Address will be displayed automatically

simply if i entered AccountNum then the fields Address in the grids will be triggered,plz rply

Hi,

For your requirement, you should have accountnum field in dept table and add relation for accountnum field in dept table with cust table. Set accountnum field - Allowedit property “No” in custtable table. Provide join source property for dept datasource in form datasource. Write following code in cust table insert method

CustTable custTable;

;

custTable = CustTable::find(this.accountnum);

dept.address = Address::find(custTable.tableid,custTable.recid,addresstype::delivery).address;

dept.insert();

Addresstype depends on your requirement.

If possible, Can you please explain the use of the form that you are trying to build and what you are trying to achieve by doing so?

thanks for ur responce,but i’ll try this is not working ,the data not populate in the address field (of AccountNum (1101)) …any ideas

we want to know the specific data about the customer,when i entered the AccountNum of any customer i just want know the address of that customer.

i will give the AccountNum as a Label(in design node) then the address(in the second grid) will populate with his address thats what i want,i hpoe u understand…if u know give the rply…

For this purpose you don’t need a table to hold the data, as you are trying to show the existing data.

One more consideration is that a customer can have multiple address with different types.

Attached a simple form, which suits your requirement.
Form_AddressInquiry.rar (1.22 KB)

hi!!! Kranthi…

Thank u soooo much…,it’s working,but the address will comes only for 1101,if i can enter 1102 the grid is empty,i want the address for which i enter the accountNum ,that AccountNum address will be displayed…i think u got it,plz give the rply ,what r the changes made in that code

1102 is not having the customer reference address(related with cust table), it is related to party(Global Address Book/DirPartyTable). The previous example will only includes the customer reference addresses. I have changed the form as per your requirement
Form_AddressInquiry_Changed.rar (1.38 KB)

Hi…Kranthi, thanking u for ur amazing rply.it’s work probably…

Thank’s a lot…