I have an output field 'id' whose value depends on an input field. The id maps to a field 'refid' in a functional map. The functional map runs multiple times if there are multiple refids and generates the output accordingly. But I want the value of id to be 0 if the refid=p and 1,2,3,4...and so on if the refid='d'. So basically I want to increment the value of id each time for each refid='d' so that I can get the value of id as 1 for first refid='d' and then 2 for second refid='d' and so on. Can anyone Please help me on this. I am stuck at this issue for long. Would appreciate any help on this.Thanks in advance.
This topic has been locked.
2 replies Latest Post - 2012-11-20T06:16:21Z by Muk1234
Pinned topic Increment a value of an output field
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-11-20T06:16:21Z at 2012-11-20T06:16:21Z by Muk1234
SystemAdmin 110000D4XK6184 PostsACCEPTED ANSWER
Re: Increment a value of an output field2012-11-19T14:21:52Z in response to Muk1234I'd suggest you use an integer as the counter's value, initialize it to 1 when the map starts, and then use GETANDSET to increment it.
The number should be of fixed length (padded to fix length with zeroes works) and long enough to accomodate the highest possible value.
Hope this helps