cancel
Showing results for 
Search instead for 
Did you mean: 

handle multiple occurences

Former Member
0 Kudos

Hi All,

Input structure

Messages 0.. unbounded

MsgType 1..1

BDate 1..1

EDate 1..1

Msg 1..1

I have to send it to target structure such tht if Msg type contains " C Error" and Bdate and Edate is within the valid date range.

then the target structure should be

Idate

item C Error

Idate

item (Msg)

I am able to do it.

But now the issue is there can be multiple occurence if Messages tag.

Please help me to solve this problem

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Which are the occurrences of the field on the target structures?

Regards

Ivan

Former Member
0 Kudos

Hi,

Idate 0... unbounded

item C Error 1..1

Idate 0... unbounded

item (Msg) 1..1

Input

<Messages>

<MsgType>C Error</MsgType>

<BDate>20070917</BeginDate>

<EDate></EndDate>

<Message>Description for C Error</Message>

</Messages>

<Messages>

<MsgType>C Error</MsgType>

<BDate>20070919</BeginDate>

<EDate></EndDate>

<Message>Test Description C Error</Message>

</Messages>

Output

<Idata>

<item>C Error</item>

</Idata>

<Idata>

<item>Description for C Error</item>

</Idata>

<Idata>

<item>C Error</item>

</Idata><Idata>

<item>Test Description for C Error</item>

</Idata>

Thanks

Former Member
0 Kudos

Hi,

Try with this:

http://www.imagenonline.com/img_a172392.gif

Notes:

indexOf2 : is a standard function

areInRange: is a UDF You need to define

Regards

Ivan

Former Member
0 Kudos

Item occurence is 1..1

I cannot duplicate it.

Thanks

Former Member
0 Kudos

Hi NPrabhu,

Try with this:

http://www.imagenonline.com/img_a172395.gif

Regards

Ivan

Answers (1)

Answers (1)

Former Member
0 Kudos

Closed