Getting Values From EDT Lookup

Hi All ,

Please tell me how to get single field value from the lookup.For Example,CustAccount is EDT Lookup Which contains fields like AccountNo,Name,telephone,etc…I want to get customer name(Sunset Wholesales) using the Account(like 1101).

Thanks in Advance…

Use the custom lookup such as SystableLookup class.

Lookup forms are used for selecting a value of a field. If you have a lookup for customer number, you get a customer number, obviously. You can easily use customer number to find the whole customer record and any fields there.

If this isn’t suitable for you, please tell us why. It’s not clear what you’re trying to achieve.

If it means that you don’t know how to find a customer from its account number (and therefore it’s not really about a lookup form), first find the CustTable record for the given account number and then call the name() method. For example: CustTable::find(‘1101’).name().

Thanks fr ur reply Martin…
Consider the following scenario
In my form, desingn contain three stringedit controls.
For the first control i have used CustAccount as EDT and it acts as a lookup.
If i select any field from the lookup
The following fields should update with the values Name(stredit 2)and Telephone(stredit)…
No datasources…
Tell me the posiibilities…

  1. Take customer account number from the first control
  2. Find the corresponding CustTable record (CustTable::find())
  3. Get values you want, such as name()
  4. Put them to the other controls

If you have some problem with, please tell us what exactly the problem is.