- Posts: 2
Referring to previous records in an adaptor
- Tim Parsons
- Topic Author
- Offline
- User
Less
More
1 year 3 months ago #3692
by Tim Parsons
Referring to previous records in an adaptor was created by Tim Parsons
I have an annoying little problem. I have a set of similar-but-slightly-different CSV files (from a spreadsheet) I want to merge into a single file.
I'm a new user, so be gentle with me
There's a date field. Unfortunately, because the person who created the original data thought visually instead of in data terms, the date of the next record, if the same, will be represented with a ditto (") sign instead of the date. So the data looks something like
and so on.
Is there a heater that can hold the content of the previous record's date field and replace a ditto, if found, with that, and then update the variable and continue? So I'd end up with
I'm a new user, so be gentle with me
There's a date field. Unfortunately, because the person who created the original data thought visually instead of in data terms, the date of the next record, if the same, will be represented with a ditto (") sign instead of the date. So the data looks something like
Code:
01/01/2015,blahblahblah
",different data
",more different data
02/01/2015,another record
",yet another record
and so on.
Is there a heater that can hold the content of the previous record's date field and replace a ditto, if found, with that, and then update the variable and continue? So I'd end up with
Code:
01/01/2015,blahblahblah
01/01/2015,different data
01/01/2015,more different data
02/01/2015,another record
02/01/2015,yet another record
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
1 year 3 months ago #3693
by FlowHeater-Team
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.
Replied by FlowHeater-Team on topic Referring to previous records in an adaptor
Hi Tim,
Yes of course For this you need the LastValue Heater . But your case is a bit tricky because the LastValue Heater only works with empty data fields. The sign “ must be removed before.
To do this you need the a IF-THEN-ELSE condition to check whether the field contains the sign. Only in case “NO” the field content is passed to the LastValue Heater .
If made a brief example, please have a look to the attachment.
Yes of course For this you need the LastValue Heater . But your case is a bit tricky because the LastValue Heater only works with empty data fields. The sign “ must be removed before.
To do this you need the a IF-THEN-ELSE condition to check whether the field contains the sign. Only in case “NO” the field content is passed to the LastValue Heater .
If made a brief example, please have a look to the attachment.
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.
Please Log in or Create an account to join the conversation.
- Tim Parsons
- Topic Author
- Offline
- User
Less
More
- Posts: 2
1 year 3 months ago #3694
by Tim Parsons
Replied by Tim Parsons on topic Referring to previous records in an adaptor
Oh, brilliant -- thanks so much, that looks perfect!
Please Log in or Create an account to join the conversation.
Time to create page: 0.267 seconds