Page 1 of 1

LANSA Composer : How to using the value of the previous record in processing the next record

Posted: Thu Feb 08, 2018 1:35 pm
by Rieko Saitoh
Hi,

This is a LANSA Composer question. Since I could not find the forum for LANSA Composer, can I ask you a question here?

<details>
I would like to convert data and add records from Excel file to a physical file on IBM i. I would like to do the following three with the conversion map(Altova MapForce).

1) I would like to add branch numbers in sequence, if Excel's A columns value are the same. I would like to count up and add a branch number while the value of column are the same.
2) I want to count up again from 1 when the counted up value reaches 99.

I will send you the sample Excel files. Please see attached files.
SAMPLE.xlsx : Sample data
SAMPLE2.xlsx : I would like to add branch numbers like this and update to file on IBM i.

I think it is necessary to hold the value of column A and a branch number of the previous record, and compare with the value of column A of the next record, and count up a branch number by the Altova MapForce.
I do not know how to hold the value of the previous record.

<questions>
Can I hold the value of the previous record, and compare and countup in the next record with the conversion map(Altova MapForce)?


Best regards,
Rieko Saitoh
LANSA japan

Re: LANSA Composer : How to using the value of the previous record in processing the next record

Posted: Mon Feb 12, 2018 9:15 am
by JamesDuignan
Hi Riecko,

As this is a question of how can I achieve this in Mapforce, I suggest that you post this on the Mapforce user forum found here: https://www.altova.com/forum/default.aspx?g=topics&f=38

There are a lot of very well versed Mapforce users active on that forum and this would be the best place to get guidance on your question.

Regards,

James

Re: LANSA Composer : How to using the value of the previous record in processing the next record

Posted: Wed Feb 14, 2018 4:31 pm
by Rieko Saitoh
Hi,

James, thank you for the advice. I asked the question to Altova support, and I was able to achieve my purpose. The method is as follows.

1) Using 'auto-number' function.
http://manual.altova.com/Mapforce/mapfo ... number.htm

2) Building logic using multiple functions.

Thank you.

Best regards,
Rieko Saitoh
LANSA japan