Skip to main content
Question

Learning how to loop.

  • August 19, 2024
  • 6 replies
  • 186 views

bjudes
Enthusiast
Forum|alt.badge.img+10

I’m trying to learn how to use loops, so I’m creating a basic dissolve loop. However, no matter how many iterations I set it to run for. It seems to go on infinitely. Also, although the loop is set to ‘loop’ back to the ‘Looped’ input, it seems to keep looping back to the ‘input’ transformer?

I’ve attached both the workbench and the shapefile I have been using for this test, any help would be much appreciated.

Thanks

B

6 replies

nielsgerrits
VIP
Forum|alt.badge.img+52

In ReLoop.fmx in AttributeCreator_3 you set _count = @value(_count_+1 which should be @Evaluate(@Value(_count)+1).


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • August 19, 2024

@nielsgerrits Thanks for the feedback. I updated as you said, but it is still infinitely looping. Did you get it to run to a set number of iterations? Thanks so much for the help. 


nielsgerrits
VIP
Forum|alt.badge.img+52

Attached a sample you can use to build on.


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • August 20, 2024

@nielsgerrits Thanks!! That is the demo I used to build the original loop I uploaded. I still can’t understand why the data is not looping for me. 

My data enters the loop as expected through the ‘Input’ port and passes through my process. It then goes through a tester, if it fails the tester it is set to loop again. However, this data never reaches the ‘Looped’ port. Even though I know for a fact there is data failing the tester. 

I just can’t figure out why it’s not going back to the loop. Thanks


nielsgerrits
VIP
Forum|alt.badge.img+52

Not sure why but I have issues installing your custom transformer so I can’t reproduce what you have. In general it pays off to make small steps when iterating and developing a workspace. This is a but cumbersome with a custom transformer but I think this is what you need to do.


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • August 21, 2024

@nielsgerrits I tried building the whole loop transformer from scratch and am still getting the same error. I have attached a new version of the workspace/data/loop to see if there is a chance you can replicate the error. Thanks for all your help. :) 


Reply


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