TOPIC: Update using lookup field

I'm getting another problem these days with mysql table as writer set to 'Update Data' only.

My problem is that I need to update all records related to the lookup field found ! It only update the first one as unfortunatly

It is a Part -> Items relation. I create items first, so then system don't create parts that has no items ( The lookup fail, so its ok! ). After I need to put information related to these items(Their part information) that are in another DB. But My lookup only update 1 record

I tried secondly using Group out Heater. Create part rows first, then do a Count(ID) lookup on my field to create as many rows as items related to part. The problem is that I must parse an excel to know this row number to create ( It is the column 1 named ID ).

So by now I did an ugly update .net script that grabs all fields that I need to update Items.
Then if the filter is good : AdapteWrite.Exec .. ( Update tblParts Set field 1 =... Field 2 =... field 3 =, field 4.. where pieceid = MYLOOKUPED_ID ! ).

Only your last case let me know what you want. If this runs you can switch the primary key information only to the "pieceid" field. FlowHeater generates then the SQL WHERE update statements like you in the
.NET Script Heater
.

Go on the
MySQL Adapter
configurator for the WRITE side and click on the "Fields / Data types" tab. Here you can switch the primary key fields. Click on the field and enable/disable the primary key checkbox.

NOTE: This doesn’t change the primary key on the database table. By these fields FlowHeater just generates the SQL WHERE statement for updates.

Warning: If you change the primary key information by yourself FlowHeater can update more than one record per each row.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.