cancel
Showing results for 
Search instead for 
Did you mean: 

A query regarding remove context and collapse context

Former Member
0 Kudos

when we use remove context or collapse context, we can see the loss of context and all the elements getting displayed in first record itself.......what shall we do to display them in second record???

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Raghu

Thanks for your Reply

But what i meant is something else

For example take a record with occurrence 1-3

If we use Remove or collapse context then the output will generally get displayed in 1st occurrence of target record  but i need it in second occurrence of the target Record.

For that what shall i do ??

manoj_khavatkopp
Active Contributor
0 Kudos

Add an UDF which adds SUPRESS for the first occuerence.

bhavesh_kantilal
Active Contributor
0 Kudos

You will have to do this using a UDF.


Code


result.addValue("");

result.addContextChange();

for ( int i = 0; i < input.length; i++ ) {

     result.addValue(input[i]);

}

UDF Signature

Usage



In this example, I am assigning Course to the Root Node Context so there are no Context Changes.

Regards

Bhavesh

former_member186851
Active Contributor
0 Kudos

Gopal,

Then UDF will do,Check Bhavesh reply.

Let us know if its not working.

Former Member
0 Kudos

sure

former_member182412
Active Contributor
0 Kudos

Hi

Can you provide the sample source data and what you expect in the target.

Regards,

Praveen.

former_member190293
Active Contributor
0 Kudos

Hi GOPARAJU!

Actually, If you want just to take element from context by particular index, you can do it without any UDF at all.

Regards, Evgeniy.

bhavesh_kantilal
Active Contributor
0 Kudos

My response just assumed that the requirement was to use Collapse/Remove Contexts and move the data to the 2nd Segment.. Will be interesting to see the actual requirement as has been requested by you and Praveen!

Regards

Bhavesh

former_member190293
Active Contributor
0 Kudos

It's always the most difficult part of answer - to understand first what actual requirement is

Regards, Evgeniy.

former_member186851
Active Contributor
0 Kudos

Hello Gopal,

Use Split By Value to split the context.