Skip to main content

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

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! 🙂


thats what i m doing still not working

 

image


still rejecting

image


still rejecting

image

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


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

check my SS as well please


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


Please see the attached File


Please see the attached File

from your workspace. see the tan colored annotation

image


still not rejecting

 imageimage


image


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


so how can i do that ??


still not

 

imageimage


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