Link to home
Start Free TrialLog in
Avatar of Dee
DeeFlag for United States of America

asked on

Need to update fields wtih different field names based on values in another table

I have a spin off question to a previous question to which Pcelba provided the perfect solution.

The scenario has changed a bit..

I have included a link to my previous question with Pcelba's perfect solution.

Previous post with solution

I am also including here the new table structures  with sample data.

A new field, clientid, has been added to the mix.

Based on clientid and the value in a descrip field in the scrub table, I need to replace that value in the scrub table with the referenced value in the label table.

For example, if clientid  in the scrub table is "1" and the corresponding descrip field in that record contains "red", the descrip field value in the scrub table needs to be updated to "Crimson".

    if the clientid in the scrub table is "2" and the corresponding descrip field contains "red", the descrip field value in the scrub table needs to be updated to "Wine".

etc, etc, etc

I have attempted to modify Pcelba's solution by adding the id field to the index and seek command.  I am getting really wacky results...

I am still using my employer's legacy VFP5 apps...

User generated image
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dee

ASKER

Thanks Pcelba!  Perfect as always!