Dynamic data import / export


simply more productive
Download the freeware version (10 Mb)
Up to 10,000 records can be processed with the freeware version!
Welcome, Guest
Username: Password: Remember me
Welcome to the FlowHeater support forum.

Questions about using FlowHeater are answered here.

TOPIC: Update using lookup field

Update using lookup field 5 years 11 months ago #2067

  • Francis
  • Francis's Avatar
  • Offline
  • New Member
  • Posts: 13
Hi M. Robert !

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 :S

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 ! ).

Is there any other ways doing this ??.
The administrator has disabled public write access.

Re:Update using lookup field 5 years 11 months ago #2068

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Posts: 233
Hi Francis,

I don't know what you mean :unsure: Could you post example data, please?

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.
The administrator has disabled public write access.
Moderators: FlowHeater-Team
Time to create page: 0.072 seconds