Browse duplicating after EIP save

I have a browse object with several fields and 2 EIP fields (an Edit Drop List and an Edit Entry field). My example has 2 rows/records and when I edit the 1st row’s EIP Edit Entry field and hit enter - the browse appears to duplicate the 2 rows into 4 rows. But, when I edit the 2nd rows EIP Edit Entry field - the browse goes back to 2 rows.

In the EIP Edit Entry field’s TakeAccepted procedure, I can put a BRW1.ResetQueue(Reset:Done) and it will not duplicate, but it also won’t save the modified data.

So, I’m not sure where to go from here. Can anyone please offer a simple solution (relatively new to Clarion)?

Is this a SQL database on the backend? If so, you need to make sure your sort order columns for the browse is unique. Usually, I’ll add the primary key field to the list of additional fields in the browse template.
The logic that repositions the browse after editing or scrolling breaks down when the sort order columns aren’t t unique per row.

Are you talking about adding the PK field to the Additional Sort Fields in the Default Behavior? I did that (added the PK) and got an error. But, there is another field that is unique, so I added that…it still didn’t work.

This is some of what I have in the section where the template adds the fields:

! Filling in browse options on TableName
BRW1.AddSortOrder(,TableName:PrimaryKey)
BRW1.AddLocator(BRW1::Sort0:Locator)
BRW1::Sort0:Locator.Init(,TableName:recordid,BRW1)
BRW1.AppendOrder(’+TableName:UniqueFieldName’)

Also YES this is a SQL backend.

So it looks like you are already sorting on the primary key. Is that a unique index on the SQL database side?

Individually, the field is not unique, but it is a composite key. Is it possible to bind a composite key?

Scratch that. I’m not using the composite key. I’m using the primary key from the joined table, that I’ve added to Additional Sort Fields (sort type = Assisted).

Why don’t you show us the View() definition for the browse, plus the table definitions.

I have it working now. Not sure if this is what’s supposed to happen but when the EIP Entry field is killed, i ResetQueue(Reset:Done) and that works.

If this is not the right way to do it, I’ll have to research that later…I’m on a deadline.

Thanks for your help!!!

doing the ResetQueue is forcing a full refresh of the browse. That’s why it is working. The normal refresh at the end of EIP tries to just refresh the row you edited and other rows visible in the list at the position of the edited row.
That works, but I’m pretty sure it will reposition the selection of the list.

So far, it’s working…ok. I can’t add column sorts because it starts duplicating again. But, the amount of data that will be pulled it at one time is relatively small (2-4 rows) so, I don’t think sorting will be a major concern. If it is…I’ll address it then.

As far as repositioning the list…I haven’t seen anything “weird”, so for now…I’m going to say this is take care of. LOL (finger’s crossed)

Again, thanks for your help.