You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

"Data being added conflicts with existing data" errors

5 replies [Last post]
Larry's picture
User offline. Last seen 3 years 1 day ago. Offline
Joined: 03/18/2008
Posts: 19

I've got several new pages in my project. Multi-row with grids, using PS_INSTALLATION as the Search record, with only the Update/Display action available on them security-wise. Any searching is done via search criteria fields at the top, and Peoplecode is used to build & execute the SQL to fill the grid based on search criteria entered.

The pages work fine for adding new data. The issue is when it comes to updating existing data.

Do a search using the functionality at the top of the page and user can update just fine. Manually enter a new row using [+] button, and user gets the error listed in the thread title. Unfortunately, disabiling the [+] button is NOT an option.

Anyone know how to avoid or trap this error, or some workaround?

Lepa's picture
User offline. Last seen 2 years 5 days ago. Offline
Joined: 06/23/2008
Posts: 591
Re: "Data being added conflicts with existing data" errors

Larry, i have developed the same functionally for one of our pages but minus the ability to add new records. It is very odd you are having such an error. Does the error happen when you click on the grid (+) or after you enter the needed info and try to save the page?

Without being able to look at your code, the best option is to trace your page both SQL and PeopleCode trace. This will pin point the SQL causing the problem, or the Peoplecode if it is code related. Would it be possible that your peoplecode is picking up the wrong row num from the grid? and thus the already existing data?

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Yogesh Rathore's picture
Yogesh Rathore (not verified)
Re: "Data being added conflicts with existing data" errors

Hi...
Can anyone help me....
I am trying to create a new data in CI through "Test Component Interface" ulility but it's giving the error as mentioned in above subject.
I anly inserting required info and it's working fine thrugh portal but problem is through Application designer.
Thanks in advance.....

Thanks & Regards
Yogesh Rathore

Krishna P's picture
Krishna P (not verified)
Re: "Data being added conflicts with existing data" errors

Hi,
I too have the same issue. I am doing a vendor conversion program using CI from PS 8 to 8.8. I am also getting the same error/warning message. I ran the CI in interactive mode and the error comes at the time of saving the CI. I am unable to figure out which record is giving this error.

Please help. Thanks.

gpawar.ps's picture
User offline. Last seen 10 years 25 weeks ago. Offline
Joined: 02/06/2009
Posts: 10
Re: "Data being added conflicts with existing data" errors

Hello Yogesh & Krishna,

While adding new row with the help of CI, if row for that data is already present then CI/AE throws an error- Data being added conflicts with existing data.
I have faced same issue and to overcome this, I have wrote a logic which checks if the row is alredy present or not.

If row with data is already presnt then -
Use CI object method "Item". and the CI object can be used to update the existing row.
e.g. &oCollJob = &oCollJobCollection.Item(&i);

Else
Use CI object method "InsertItem" and the CI object can be used to insert the new row.
e.g. &oCollJob = &oCollJobCollection.InsertItem(&i122);

Hope this information will help you.

Regards,
Ganesh Pawar

Regards,
Ganesh Pawar

Guest's picture
Guest (not verified)
Re: "Data being added conflicts with existing data" errors

Hi Ganesh,

How are you checking in your CI that the row already exists for an employee.
Code will be of great help
Thanks.