Jump to content
Sign in to follow this  
Craig Kelly

Indexing / relationship trouble

Recommended Posts

Hi all,

I have 2 separate files in my billing system:

1. Facture (invoice, taxes that I charge to my customer, total, customer ID, ect.)

2. Deduction (my expense by categorie, taxes that I pay on each expense, and taxes total)

In my "facture file (1)" , I want import the total taxes summary of the "deduction file (2)" with define relationship fonction.

I want import "grandTotalTPS" field:

(un.Total TPS + deux.Total TPS + trois.Total TPS + quatre.Total TPS+ cinq.Total TPS + six.Total TPS + sept.Total TPS + huit.Total TPS + neuf.Total TPS + dix.Total TPS + onze.Total TPS)

And "un.Total TPS" is taxes a summary

If I can't index a summary, how I do to import "grandTotalTPS" in an other file?

Thanks

Share this post


Link to post
Share on other sites

Hi Craig,

I think the best answer is to re-think what you're doing. I don't think there's a need to import anything.

Going by your description you should have some more files. There should be an invoice_items file.

Through a relationship from the Invoice file to the Expense file you should be able to get the Expense total and work with it without importing it.

(As an aside: avoid using dots "." in file names. If you ever need to allow ODBC access to your files you will be in trouble. The "." in SQL syntax is the delimiter between a table name and a field name. As in: Customers.Name - meaning the Name field of the Customers table)

Share this post


Link to post
Share on other sites

Through a relationship from the Invoice file to the Expense file you should be able to get the Expense total and work with it without importing it.

I don't understand how to get this total from the Expense file without importing data. Do you told me that I should merge the Expense file with Invoice?

Thanks

Share this post


Link to post
Share on other sites

If the files are properly related, you can simply put a field from the second file on the layout of the first.

Share this post


Link to post
Share on other sites

Well, of cours it's not properly related I presume, if I copie and paste the Total field in my Invoice file, I see " Feild Missing". How I properly relate the file?

sorry, I mad some search and I didn't understand.

Thanks

Share this post


Link to post
Share on other sites

It's not a good idea to use a summary field (like your un.Total TPS) directly in a calculation. For that purpose, you need to add another calculation field which uses the GetSummary function. This function specifies the break field. The break field should be related in some manner to your other file. Then you should be able to put that field on the other layout.

If you could upgrade to version 7, then you could see graphically how the files are related. If you don't have any relation, then all you can use are global fields from the other file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.