cancel
Showing results for 
Search instead for 
Did you mean: 

the value increments and the initial value is dynamic

Former Member
0 Kudos

hi experts,

any advise please on the mapping of a target field that increments by a value of 1, and its initial value is dynamic.

the initial value is dependent on the number of e1edl20 segment.hence, the initial value is 2.

thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

vijay_b4
Active Contributor
0 Kudos

Hi Lex,

Map E1EDL20 node directly to the target filed.So that as many times E1EDL20 segment occurs the target files also get populated.and Gabriel said use the Counter or write a UDF for set segment counter for the fields required.

Reward points if this helps

Regards

Pragathi.

GabrielSagaya
Active Contributor
0 Kudos

There is a function "Counter". You select this and specify your starting value and incremental value. In your scenario you add one more field to your structure in lineitems and add this counter to that field. So the starting value you give as '2' and increment it by '1'

Former Member
0 Kudos

hi gabriel,

sorry for the confusion. I mean for instance if there are 2 e1edl20 segments, then the initial value is 2.

Also in this scenario, I just have one target element. the parent of this target element occurs multiple times based on the number of e1edl20.

do you have other suggestions?

thanks!

Former Member
0 Kudos

Lex,

for doing this solution is select the node e1edl20 and add the Count Standard Function from Statistic.

Statistic --> Count

If will count the number of time your node exist in input structure.

Gaurav Jain

Former Member
0 Kudos

hi Gaurav,

yes its possible tho. however we really wish to have it dynamic. what I have mentioned above is one scenario.

the initial value that is dynamic is dependent not not only on the number of e1edl20 but also on the e1edl24 segments. apologies, but pretty much, this is the scenario.

what i have done is that...

e1edl20->count->

e1edl24->count-> added both

then the sum, it will then be the initial value.

any advise please?