Skip to main content

Hello,

I would like to +1 a value into a field using the Counter Transformer and although the expression I have used works in the evaluator I keep getting a rejected output with INVALID_PARAMETER_COUNT_START.

The output from the SQL Creator Transformer seems to output the correct number.

Can you tell me what I'm missing? Thank you.Workbench_Screengrab

The first feature to pass through the counter "primes" the counter so to speak, so theoretically this should work. I just tried it with a Creator and RandomNumberGenerator to have it start counting at a random value + 1 and that works.

 

A quick workaround would be to have the count start at 1 and store it in a separate attribute, then later on calculate OBJECTID to be MAXOBJECTID + that count value.


Hi @chris_acc​ , another thought.

Multiple Global Counters belonging to a common "domain" (also called "counter name") generate numbers with a common sequence. You therefore can initialize the start number of a sequence with the MAXOBJECTID using the first Counter connected to the SQLCreator and then start counting with MAXOBJECID+1 using the second Counter belonging to the same domain. Note that you have to run the SQLCreator at first.

The attached screenshot illustrates the mechanism. In this case, Count Start parameter setting in the second Counter will be ignored.common-counter-domain


Thank you @Takashi Iijima​ (especially for the scree grab!)

I have now tested this and it worked perfectly :-)


Reply