Question7Replies394Views KumarK6558 Member since 2019 9 posts TSL Posted: April 10, 2020Last activity: April 12, 2020 How to Increment counter value in pega 8I have created one activity.In that, in adding incomming data to data typei have many columns and also one PRIMARY KEY(ID- Integer type)now, want to auto increment this EMP ID for every row inserting...... Can some tell me??? Refer the attachment ***Edited by Moderator Marissa to change type from Pega Academy to General; update Platform Capability Tags*** Data Integration ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Posted: 7 months agokanap2 PEGA replied to KumarK6558If the Employee ID in Data Type starts from 1, then Get the pxResultCount from the Data Type by using a data page and increase it by 1 and set it for the new row's ID. Posted: 7 months agoyerrh PEGA replied to kanap2Hi kanap2,If the Employee ID in Data Type starts from 100, then your solution may not work so you need to do one small modification i.e increase by 1st EMP ID rather than increasing by "1". Posted: 7 months agoyerrh PEGA replied to yerrhYou can also try to fetch the last emp id and increment it by 1 Employee.pxResults(<APPEND>).Employeeid=Employee.pxResults(<LAST>).Employeeid+1 Posted: 7 months agoKumarK6558 TSL replied to yerrhThanks Its working Posted: 7 months agokanap2 PEGA replied to yerrhThanks yerrh for the additional information.Yes, we can add pxResultCount to pxResults(1) and set it to Employee ID. Posted: 7 months agoKumarK6558 TSL replied to yerrhThanks Its Working. Posted: 7 months agoKumarK6558 TSL replied to kanap2Thanks Its Worked.