Skip to main content
Solved

Looping through list to exclude counts

  • May 27, 2024
  • 2 replies
  • 83 views

pauld
Contributor
Forum|alt.badge.img+1

Hi.

I have a problem where I have a local counter (_count) that adds a counter to each feature that passes through. I also have a list of numbers I want the counter to ignore. 

Eg 1 to 10,000 but ignore the 244 numbers in my _ignoreList, which is dynamically created.

 

1,2,3...39,40,42 (ignore 41 because its in my list)

Any ideas on how I would go about this?

All help is greatly appreciated.

Regards, Paul

Best answer by geomancer

  • Use a ListBuilder to create a list (in the FME sense) of the IDs to ignore
  • Add this list to all input features (use a FeatureMerger with dummy values to join on)
  • Use a ListSearcher to check whether a feature ID is in the ignore list
  • Continue with the features to process

 

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.

2 replies

geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • Best Answer
  • May 27, 2024
  • Use a ListBuilder to create a list (in the FME sense) of the IDs to ignore
  • Add this list to all input features (use a FeatureMerger with dummy values to join on)
  • Use a ListSearcher to check whether a feature ID is in the ignore list
  • Continue with the features to process

 


pauld
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 28, 2024

Thank you @geomancer. Perfect!