Skip to main content
Solved

Counter Transformer: Invalid Parameter Count Start

  • February 15, 2022
  • 3 replies
  • 37 views

chris_acc
Contributor
Forum|alt.badge.img+5

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

Best answer by takashi

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

View original
Did this help you find an answer to your question?

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+48

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.


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • February 15, 2022

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


chris_acc
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 16, 2022

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

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


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