Skip to main content
Solved

Fanning out a feature based groups of a set number


Forum|alt.badge.img

Hi there,

I've been trying to find answers all over the internet, but no results.

In short, I'm generating a CSV output where my input is an unknown amount of entries (workbench will be run several times and input varies each time), but I want to generate a separate CSV for a maximum of 500 entries found.

So as some examples, based on hypothetical inputs, this is the output I want:

350 entries - 1 output sheet

1700 entries - 4 sheets (3 with 500 each and one with 200)

502 entries - 2 sheets (one with 500, another with 2)

I'm not particularly concerned about the order of these features. I tried the ModuloCounter, but instead of splitting up my input per 500, it splits up my input into 500 equally sized groups, which won't do.

Thanks in advance,

Best answer by ebygomm

If count your attributes then you can create a group in the AttributeCreator with the following formula

@Evaluate(@floor(@Value(_count)/500))
View original
Did this help you find an answer to your question?

4 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • August 10, 2018

If count your attributes then you can create a group in the AttributeCreator with the following formula

@Evaluate(@floor(@Value(_count)/500))

Forum|alt.badge.img

@egomm,

Works perfectly, thanks a million!

Best regards,


robotix
Contributor
Forum|alt.badge.img+10
  • Contributor
  • March 11, 2019

I'm trying to figure out how to split a list into smaller segments. I assume this would work the same but I don't understand how you are using the formula. Do you have a visual?

thanks


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • March 11, 2019
robotix wrote:

I'm trying to figure out how to split a list into smaller segments. I assume this would work the same but I don't understand how you are using the formula. Do you have a visual?

thanks

This assigns a common attribute to features so that each group contains a specified number of features (in this case 100) . The common attribute can then be used in a fanout

The workflow to split a list into smaller segments would be quite different.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings