DuplicateEntityInstanceError

We are getting DuplicateEntityInstanceError when we add the instance in ContainmentRelationshipInterviewControl.
We have 2 consecutive forms/screens in the flow.First screen has ContainmentRelationshipInterviewControl with formid qs$s187@Development_Interviews_Screens_xint$harassmentincident$Entity0.The 2nd screen has the ContainmentRelationshipInterviewControl with formid qs$s187@Development_Interviews_Screens_xint$harassmentincident$Entity1. (the difference of formid's between the 2 screens are Entity0 & Entity1).
When we add the entity instance for the 2nd form it's throwing the duplicate entity instance error.
We are adding the entity instance manually as mentioned in the below code and submitting the screen.
For i = 0 To NoOfEntityInstances
DirectCast(screen.GetControls()(0), Oracle.Determinations.Interview.Engine.Screens.ContainmentRelationshipInterviewControl).AddNewInstance("Entity" & i)
Next
For both the forms it's adding the same instance(Entity0),so, it's throwing the duplicate error.I believe,if i can able to add the Entity1 ,2 and 3 and so on for the other Entity instances i can come over this problem. For that i need to find out if the instance already exists or not, if it's not there i have to add the instance.
I tried with the below line ,but it's not accepting since instance does not exist/ not added
DirectCast(screen.GetControls()(0), Oracle.Determinations.Interview.Engine.Screens.ContainmentRelationshipInterviewControl).GetInstance("Entity" & i)
Is there any boolean function to identify whether the instance already added or not?
Thanks in advance,

If you set your base value to 'entity' for Entity Control in OPM and then call ContainmentRelationshipInterviewControl.AddNewInstance() then this will do what you are trying to do manually (ie assign unique entity instance called 'entity0', 'entity1' etc). Otherwise, you must ensure that all the instances of a given entity have a unique name which would involve looking at all the instances of the entity you are collecting that are currently in the session, plus the ones that you are adding on the screen.

Similar Messages

Maybe you are looking for

  • For some reason, I now have to double-click on my bookmarks on my task bar. How do I change it back to a single click?

    In my bookmarks task bar, I used to have to just single click on the bookmark and it would open to that site. Now it seems that I have to double-click to get the bookmark to open. I want it back like it was - single click opens site. Please tell me h

  • HP monitor issues

    My monitor keeps acting like there is a second monitor being plugged in, and switches from the large screen to the small screen like it would if it was switching monitors. How do I fix this?

  • Import Manager Performance Issue

    A data load that once took 10 minutes to run is now taking more than 2 hours!  What could have happened? This change in run time has occurred in the last week after we've been loading data constantly over the past year!  The results are the same whet

  • Table name and filed name from a scrren fiels

    I'm using Oracle Forms 10g I have 2 screen fields named :TABLE_NAME & :COLUMN_NAME I wrote a trigger 'SELECT :COLUMN_NAME INTO :F FROM :TABLE_NAME;' and this syntax is not accepted; I'm trying to get the field name and the table name from the screen

  • Why I can't see the download icon in free apps?

    I need some help ppl.. In app store I can only download paid apps. When i go to free apps it doesn't show me the install/free button! Any idea?