cancel
Showing results for 
Search instead for 
Did you mean: 

Distinct values in BLS

HariCS23
Contributor
0 Kudos

Is there any action block which give me distinct values.

Ex Input

Mat1 20 30 25

Mat1 20 30 25

Mat2 21 34 56

O/P needed:

Mat1 20 30 25

Mat2 21 34 56

Thanks

Hari

Accepted Solutions (1)

Accepted Solutions (1)

former_member192939
Active Participant
0 Kudos

Hari ..

Use .. Distinct Value Extractor action block under XML Functions.

Regards,

Ajay.

HariCS23
Contributor
0 Kudos

Ajay

Correct me if i am wrong.. Distinct value selector I/P and O/P is for one column.. it doesn't work on whole record or row level .

I kind of found the solution :

1. Get distinct values using distinct value selector Action.

2. Filter the main I/P for each disctict value.

3. Build OP XML by taking first of record of filtered OP.

Let me know if you or anybody know the better solution .

Thanks

Hari

Former Member
0 Kudos

You could use the Calculated Column action block to create a column concatenating all four columns. Then, use the distinct value action block to look for distinct values on the results of the calculated column block.

Former Member
0 Kudos

Ryan's suggestion is probably the most effective approach. It is analogous to creating an "index" on the table and then using it to identify distinct values.

former_member201407
Participant
0 Kudos

Dear Hari

You can do that u mentioned (1st get Distinct values, 2nd while looping on distinct values filter the parent I/O xml output.....) Thats what i have used in our some IDDs.

Also Ryan's solution is welcome.

Regards

Som

Answers (1)

Answers (1)

Former Member
0 Kudos

Hari,

If the data is from two datasets or documents you can use UNION action block. It gives the distinct values of two datasets. And also you have option of JONER action block which supports up to 4 cloumns.

If data is from single source you have to play around with the avaialble action blocks.

-Suresh