cancel
Showing results for 
Search instead for 
Did you mean: 

sort by key values are supressing

0 Kudos

Hi Experts,

I am facing a problem in understanding the "sort by key" functionality.

queue values for both if conditions respectively are                      

, but the values at sort by key are getting suppressed see out puts for both sort by keys respectively 

i am using case sensitive and ascending order at sortby key. Can some please explain the issue??

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

The output should be suppressed, just take a look at the contexts. In the last condition, the input to the if statement is true, but you don't have anything in the then condition. Not sure why it outputted SUB_GROUP, but it should also be suppressed.

Please recheck your logic. If you want to have an output in the last condition, add mapWithDefault just before the then condition.

Regards,

Mark

stefan_grube
Active Contributor
0 Kudos

The sort or sortByKey function work only for values within the same context.

It does not work for an empty context.

In your scenario the sort function is useless, as you have only zero or one element in a context.

Harish
Active Contributor
0 Kudos

Hi Siva,

Please provide more details about the mapping logic. What do you want to achieve from sort by key?

regards,

Harish