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

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Rieko Saitoh
Posts: 58
Joined: Sat Apr 30, 2016 11:46 am

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

Post 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
Attachments
SAMPLE2.xlsx
(28.38 KiB) Downloaded 1013 times
SAMPLE.xlsx
(22.36 KiB) Downloaded 984 times
JamesDuignan
Posts: 85
Joined: Thu Nov 26, 2015 1:43 pm

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

Post 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
Rieko Saitoh
Posts: 58
Joined: Sat Apr 30, 2016 11:46 am

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

Post 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
Post Reply