Solved

Counter generate IDs


Badge +5

I have one table where id already there now what I want is when I push the new data it will generate an automatic id

 

for example the Table ID is 47 and when I push new data then that table insert from 48 in ID columns

 

I use a counter to generate the ID from new data and then I use the static calculator from Table so it gives me a max number of 47 and when running that wS then it's not generate the ids

icon

Best answer by carmijo 4 October 2022, 19:36

View original

14 replies

Badge +10

Hi @asadamjad​ You can send the max value from the statistics calculator to the Count Start parameter of the Counter. That way the counter will start at the correct id value. To do this, you may need to add the max ID value to the data you want to add the ID to.

image--

If i've provided something helpful, please upvote the comment. If i've provided a solution, please mark it as 'Best Answer'. This helps the community find solutions when your question is referenced.

If I didn't provide a solution, please let me know if I can help further. Thanks! 🙂

Badge +5

thats what i m doing still not working

 

image

Badge +5

still rejecting

image

Badge +10

still rejecting

image

I attached a screenshot with a better explanation. take a look and see if that helps.

Badge +5

I attached a screenshot with a better explanation. take a look and see if that helps.

check my SS as well please

Badge +10

I attached a screenshot with a better explanation. take a look and see if that helps.

I did but it's difficult to understand where the problem is since no parameter values are showing. i would recommend attaching a summary annotation to the primary transformers like the counter_3 and counter

Badge +5

Please see the attached File

Badge +10

Please see the attached File

from your workspace. see the tan colored annotation

image

Badge +5

still not rejecting

 imageimage

Badge +5

image

Badge +10

image

I see. it's probably because the other features are getting to the counter before the feature from the statistics calculator. So it's trying to start counting but it doesn't know id.max at this point. you'll want to feed both streams into a sorter and sort in a way that the record with the id.max value enters the counter first

Badge +5

so how can i do that ??

Badge +5

still not

 

imageimage

Badge +10

so how can i do that ??

  1. locate an attribute that's populated for all your features coming out of attributremanager_4
  2. add a sorter
  3. feed features from attributemanager_4 and statisticscalculator to the sorter
  4. setup the sorter to sort by the attribute that you picked in step 1, ascendingimage
  5. then the first feature to hit the counter will have the id.max attribute populated

 

Reply