Skip to main content

Trying to find a way of creating multiple records from a range by interval some way of looping, adding 100, create new, looping until max.

 

Create starting record at 3700 = Record 1

Add 100 to Record 1 for 3800 = Record 2

Add 100 to Record 2 for 3900 = Record 3

Add 100 to Record 3 for 4000 = Record 4

Add 100 to Record 4 for 4100 = Stop, don't create record because greater than max number

 

Input / 1 Record FieldValue = 3700-4000

Output / 4 Records FieldValue = 3700, FieldValue = 3800, FieldValue = 3900, FieldValue = 4000

Hi @hlouie​ 

I suggest you to use the option Enable Adjacent Feature Attributes into transformer AttributeManager.

You cna check this Blog

https://www.safe.com/blog/2017/08/adjacentfeatureattributes-evangelist166/

 

Thanks,

Danilo


One non-looping way could be using some math to find the number of times to clone the original feature.

For example, find the difference between min and max of the range, divide that by the interval (100 in your example), and then adding one to find the number to clone. Put the feature through the Cloner and then an AttributeManager/Creator to calculate the new Field Value.

CloneRangeByInterval


@debbiatsafe​ is absolutely right. Please don't use looping! I think it would add more complexity than is necessary.

Here's a workspace along Debbi's design that should do the job correctly.


Reply