Hey Guys,
I'm having trouble with the update Operation not using the current record in the Table when checking the expression.
I am updating a database that has been in use for several years. The old database used ID's instead of Names on all the forms and field Lookups. The new user requires Names in place of the ID's. I've traced Where the data comes from and fixed most of the places that need fixing. The problem comes with a table that has several thousand entries.
The best solution I came up with is to add a Name field to the table and fill it based upon the ID that is already stored there. Not the most space efficent, but it works.
I used the Genie to create an update operation to auto lookup and fill the table.. The problem that I am having is that the update operation is only working for the first record within the table and then using that value and filling it in the rest of the table.
Here's my Update code
Field: Cust_Name
Expression: Lookup("Customer","Customer-"Cust_ID=cust_ID","Company")
Condition: .T.
If I have 10 entries in the table, all with different Cust_ID's, If the first Cust_ID is CID01 and that links up to Customer Name "Billy Bob's Towing", Then each of the 10 entries in the table has the Cust_name field filled in as "Billy Bob's Towing" even though they are different.
How do I get the Update operation to "refresh" and use the data in the 2nd entry to determine that entries Customer Name?
I'm having trouble with the update Operation not using the current record in the Table when checking the expression.
I am updating a database that has been in use for several years. The old database used ID's instead of Names on all the forms and field Lookups. The new user requires Names in place of the ID's. I've traced Where the data comes from and fixed most of the places that need fixing. The problem comes with a table that has several thousand entries.
The best solution I came up with is to add a Name field to the table and fill it based upon the ID that is already stored there. Not the most space efficent, but it works.
I used the Genie to create an update operation to auto lookup and fill the table.. The problem that I am having is that the update operation is only working for the first record within the table and then using that value and filling it in the rest of the table.
Here's my Update code
Field: Cust_Name
Expression: Lookup("Customer","Customer-"Cust_ID=cust_ID","Company")
Condition: .T.
If I have 10 entries in the table, all with different Cust_ID's, If the first Cust_ID is CID01 and that links up to Customer Name "Billy Bob's Towing", Then each of the 10 entries in the table has the Cust_name field filled in as "Billy Bob's Towing" even though they are different.
How do I get the Update operation to "refresh" and use the data in the 2nd entry to determine that entries Customer Name?
Comment