Skip to main content
Question

Removing the whole group from specific values

  • November 19, 2018
  • 3 replies
  • 17 views

parashari
Forum|alt.badge.img+2
ColA

 

ColB

 

2

 

a

 

3

 

a

 

3

 

a

 

2

 

b

 

1

 

b

 

4

 

b

 

3

 

c

 

4

 

c

 

 

I have this above input where I would like to delete the whole group (a, b, c) from ColB, if there is a '2' in ColA in the specified group.

For example, if there is a 2 in ColA, the whole group 'a' is removed from ColB (and not just the specified row).

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • November 19, 2018

A possible way is: use the Aggregator to aggregate the features grouping by ColB and also create a list attribute storing ColA values, find '2' in the list with the ListSearcher, and restore the original features from only the NotFound features with the ListExploder.


parashari
Forum|alt.badge.img+2
  • Author
  • November 20, 2018

A possible way is: use the Aggregator to aggregate the features grouping by ColB and also create a list attribute storing ColA values, find '2' in the list with the ListSearcher, and restore the original features from only the NotFound features with the ListExploder.

Hi @takashi. Maybe, I had put the statement in a partial way. I'll explain it a bit.

I have roads like shown below.

There are groups of roads that I have selected using SQLCreator from the server. Now, I have to find the specific group(like Colb(above), so all the road segments have a common group name) of roads(for which you told the above solution). And after that, I need to find how many roads are just one way and calculating their percentage(info not displayed here).

So, if I aggregate the values like above mentioned, calculating percentage would be a bit of task.

Also, I tried reading about creating list attribute transformers, but couldn't get much.

Thanks.


ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • November 20, 2018

You could use this sort of flow, test for value of 2, then use any features that pass as suppliers in a featuremerger. If you keep only unmerged features that 'discards' the whole group