Normal Topic Automaticly populating fields (Read 705 times)
Thndr
Member
*
Offline


No personal text

Posts: 5
Joined: Jan 23rd, 2004
Automaticly populating fields
Jan 24th, 2004 at 5:20pm
Print Post Print Post  
Greetings, Im working on converting a Q&A db that when an account number is typed into the account field it automaticly populates the customer name, and two address fields. This is currently working in Q&A.
My question is has anyone had any success doing this with Sesame and maybe any pointers on how to do this in Sesame.
Ive been more of a user instead of a programmer in Q&A, so any help would be appreciated.

Thanks in advance
Thndr
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Automaticly populating fields
Reply #1 - Jan 24th, 2004 at 7:21pm
Print Post Print Post  
Sesame can do everything QA did, only it does more efficiently.  You do not have to even index the key in Sesame.... As such there is no indexing at all in Sesame. I believe what you need is just xlookup commands..

Customer.db
(layout name -  customer)
AccountNo:

Name:
Address1:
Address2:
=====================
Invoice.db

AccountNo:

Name:
Address1:
Address2:

Just put the following code in AccountNo Element  of Invoice.db on Element exit event

If @IsNew then
                        {

                          Name = @xlookup ("data\customer.db",  AccountNo, "Customer!AccountNo",  "Name")

                         Address1 = @xlookup ("data\customer.db",  AccountNo, "Customer!AccountNo",  "Address1")

                        Address2 = @xlookup ("data\customer.db",  AccountNo, "Customer!AccountNo",  "Address2")

             }





  
Back to top
 
IP Logged
 
Thndr
Member
*
Offline


No personal text

Posts: 5
Joined: Jan 23rd, 2004
Re: Automaticly populating fields
Reply #2 - Jan 24th, 2004 at 7:43pm
Print Post Print Post  
Thanks for the reply, I'm going to try it, I feel a learning curve coming on.

thanks again
Thndr
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Automaticly populating fields
Reply #3 - Jan 24th, 2004 at 8:22pm
Print Post Print Post  
Quote:
I have been more of a user instead of a programmer in Q&A, so any help would be appreciated.



The best part about Sesame & Q&A is that there is no distinction between users and programmers. Users are programmers and Programmers are users !!! Practically all of us are users who could program using all the tools provided by Sesame that even neophytes can use and understand.  Smiley

  
Back to top
 
IP Logged