Hey.
I am quite new at using navision, so bare with me.
I Have this table which contains some customer complains, i want to loop through this table and find records, which have the same customer numbers, and put those in another table, how can i do this?
i tried using a giant table which have all the customer numbers, in a report, and then indent my table, but that took ~5 minutes to loop through, and that is not an acceptable amount of time.
any other ideas?
Best regards.
0
Comments
I would suggest your "Complaint Table" have at least two keys
1. Customer No
2. Complaint # (If you assign a complaint # to each complaint)
or
2. Date - Perhaps you log complaints as Per Day.
This will cut down on duplicates. Two entries cannot have the same key.
Now if you can re-explain your situation because moving to another table doesn't solve the underlying problem does it?
Does the table they are in now have any keys?
How do you want the stored in the new table to be able to keep track easier?
http://www.BiloBeauty.com
http://www.autismspeaks.org
okay, i will try to re explain!
Say i have this table which contains the following records :
Then i want to loop through the table and find the records with CustNo = 1
(because more then two complains is present for that Customer)
then i want to compress and move those two records to single line like this and then the users of the system would see that cust no 1 have complained 2 times, and then they can lookup to se the detailed complains in the first table.
confusing ?[/code]
Your report need a long time. Bute note if you have thousand of records in your table, the report needs only on first run these time.
So, the best wayto help you is.
1. what the structure of your "CopiedFromTable" and how many indexes
2. same question for CopiedToTable
3. How looks you Copy Report
Regards
First, you need no code!
Second, create a form, based on table 18.
In table 18, create a NEW Flowfield to your Complain table (count TableComplain filter CustNo = No.)
Now create your form based on Table 18
Cust No. No of Complans.
In the field No of Complains the user can drilldown
The part with the compressed ComplainDate i would not do.
A max strlen of an field in nav is 250. So what is, when the customer has more complains. These dates could not inserted in your field.
Regards
Complaints = type integer
FieldClass = Flowfield
CalcFormula = Count("Your Complaint Table" WHERE (Customer No.=FIELD(No.)))
**I assume "No." - but whatever the name you use.
Now add the field using designer to your customer card.
It will contain a number of complains for that customer.
If you drill into that number it will show all the complaints for that customer that appear on "Your Complaint Table".
By the info I see you storing this should not slow down your system, if it does you wouldn't even notice it.
**EDIT**
**oops I know it sounds weird but I didn't even read the post above**
kudos to Garak!
http://www.BiloBeauty.com
http://www.autismspeaks.org
Is it all right if we bear with you instead?
Regards