Dynamic data import / export

datenbank

simply more productive
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: Repeat field if empty

Repeat field if empty 1 year 10 months ago #2347

  • Heinz
  • Heinz's Avatar
  • Offline
  • New Member
  • Posts: 11
Hi there,

I have an input text file that has the following format (simplified for the question):

ID,F1,F2,F3
A,1,2,3
,3,4,5
,6,7,8
B,9,10,11
,12,13,14

The data is "grouped" by the ID field in the input (not sorted) and the blank ID field in a row means the data "belongs" to the last ID received. I want to generarte an output file with the ID in each row:


ID,F1,F2,F3
A,1,2,3
A,3,4,5
A,6,7,8
B,9,10,11
B,12,13,14

etc.

Hope this makes sense.

And on a related question - can I specify different filters for multiple output layers? You recently introduced the nice function of adding more than one write layer. But on the above example, I would want to generate 1 file for all the rows where ID is not blank and one file (in different format) with the details described in my question above.

i solve this for now by simply passing the file through 2 configs..

PS - as always, I am extremely happy with flowheater, its a great product!! Keep up the good work.

Heinz
The administrator has disabled public write access.

Repeat field if empty 1 year 10 months ago #2348

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Posts: 240
Hello Heinz,

This can be done very easy with the power if FlowHeater Parameters and one IF-THEN-ELSE Condition.

The IF-THEN-ELSE Condition checks whether the field “ID” is empty or not. In case the field content is not empty the FlowHeater Parameter “tempID” will be overridden by using the Set Parameter Heater with the current content. In case the field is empty the last value of the FlowHeater Parameter “tempID” will be used the value are retrieved by Get Parameter Heater.

In the attachment you’ll find a simple example.

Remark: I used the Parameter name “tempID” just to demonstrate that Parameter names are different to the Field names. You could of course use “ID” for the Parameter name as well.

Your second question: Currently this is not possible, your mentioned solution is the only way to implement such filters. But this feature is of course planned for a further version.

File Attachment:

File Name: repeat-fie...mpty.zip
File Size:2 KB
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.073 seconds