Skip to main content

Hi, This is defeating me!
Any pointers sincerely appreciated.

See attached spreadsheet, Where I have features with attributes having multiple similar IDs as well as a name attribute.

I have added the columns _num and _page, that is the desired output I manually added in.

I can achieve the _num output easy enough with a counter set to Local and group by the two Attributes Name and ID. I set the Count to be _num and Group ID to be _page. This works fine until the Name group changes and the _page will continue counting, See screenshot. However, when the new Name starts with B I want the _page to restart at 1. How do I set it? 
Thanks. Nic

 

 

You could put the counter in a custom transformer, then set that custom transformer to Group By on the Name attribute


This can alternatively be done with AttributeCreator using Adjacent Feature Processing.  It works very similarly to Counter but gives fine grained control when to increment or restart the Count using Conditional Values

 

 


Wow bwn, that is a nifty solution! Had not thought of doing it that way at all, just got stuck with the counter or even tried the Stats calculator (which I also wouldnt get to work).
Thanks heaps!
If you are ever in South West Victoria. Aussie, drop by and I will cook you a nice meal ;o)


Reply