www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  Scripting    Can't get data from secondary textbase
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Posted
Hi,

I have a script that is doing some calculations to create an invoice using 3 textbases.

I run the script in textbase 'CASES'. It creates an invoice record in textbase 'INVOICES'. But each invoice has a different tax %, and that is retrieved from 'CLIENTS' textbase.

In my script I search for and open the CLIENTS record to get the tax code for my calculations, but unfortunately I can't get any data from any of the fields.

clientSet.Open("Find 'Clinic' ct '"+currClinic+"'");
   tax = ""+clientSet.Fields("TaxMultiplier").Value;
   Application.message(tax);


The variable TAX is *always* blank when I print it. However, when I do
clientSet.Fields.Count
I get the right field count so my query to get the right tax code from the CLIENT record is correct, but when I go to get some data from the set its all blank.

The CASES database is linked to CLIENTS, so is there an easier way to access secondary textbase data rather than doing a manual query for it?

Thanks,

Justin
 
Posts: 4 | Registered: Tue August 28 2007Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
I figured it out.

I forgot the
  set.MoveFirst();
function to initialize moving through the set.

But if anyone knows an easier way to access Secondary records using scripting please let me know.

Thanks,

Justin


Takin' care of business.
 
Posts: 4 | Registered: Tue August 28 2007Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  Scripting    Can't get data from secondary textbase