May 3, 201213 yr Dear all, I have 2 tables main Table Names Total sales 2nd table Items Names total Value 2nd table::total value is a calculated field through some self joint relationship. i am trying to make a script to capture the total value and setfield to Main Table::Total sales by matching the names ofcourse this is a simplified version of the table. it is on a 50k records database. I am doing this is because i am trying to switch over from all unstored calculation fields to script based batch run so that i can increase the performance of the database because it is really slow now. regards
May 3, 201213 yr Your description is a bit unclear. Apparently, you have two tables that are related by a "Name" field. This will be a problem for you in the long run. What if there are two records with the same name? What if the name changes? It is best to assign each record a unique ID. Then, relate the tables using that ID. In the second table you seem to have a list of items and their "value." To calc the total value of all items that relate to the record in the first table use Sum ( relationship::total value). Perhaps you'd like to expand a bit on your setup.
Create an account or sign in to comment