PDA

View Full Version : dbParentCombo issue



Emil
21-Mar-2017, 03:13 PM
I have been playing around with the dbParentCombo and found the following issue.
If setting the property pbAddEmptyItem to False, the combo will display the first item in its list, but the bound table and datadictionary are not seeded accordingly.

Sture
22-Mar-2017, 12:07 PM
Hi Emil,

I agree you have something.

But an alternative approach might be to find the default record in the vendor_dd.

In oInvtItem_DD:


Procedure Clear
Forward send clear
Find some record in vendor
If (Found) Begin
Send Request_Assign Vendor.File_Number
Set Changed_State to False
End
End_procedure


-Sture

Emil
22-Mar-2017, 06:40 PM
Sture,

It is easy to fix, even easier than finding your own record. Just send Combo_Item_Changed after the combo is filled and it will seed the DD correctly. My point is that the dbParentCombo shows a value that is not really in the buffer. So if you don't change the value, like when the default value is what I want, then I will not be able to save the record. It is a db control, so it should always match the DD. I think I would call this a bug...

Emil

Dennis Piccioni
20-Apr-2017, 10:33 AM
Hi Emil,

I tried this here, using 18.2, in the Order Entry sample's DemoParentCombos.vw, using the oOrderHea_Customer_Number object and it seems to work just fine. It defaults the first customer and displays that customer's info in all of the other customer-bound DEOs. I also used the dd_debug.dg dialog to verify that the DDO buffer data looks correct.

Emil
20-Apr-2017, 03:58 PM
Dennis,

Open Invt.vw
Goto object oVendor_Name and change this to a dbParentCombo
Set pbAddEmptyItem to False

Compile & run and you will see it fail. I just verified these steps in DF19 beta 2

Regards,
Emil

Dennis Piccioni
21-Apr-2017, 03:59 PM
Hi Emil,

I've reproduced this here. First I thought it was because Vendor.Name was not uniquely indexed, but changing it to be uniquely indexed doesn't fix the problem.

Logged as bug # 7277.