dgFail

Bob Sneidar bobsneidar at iotecdigital.com
Fri Feb 16 12:43:07 EST 2018


Also printKeys() is a sqlYoga function. If you don't have it remove those lines and breakpoint at end mouseUp to see the contents of the two array keys. 

> On Feb 16, 2018, at 09:41 , Bob Sneidar <bobsneidar at iotecdigital.com> wrote:
> 
> LC Business Version 8.1.9 Mac OS X 10.13.3
> 
>> On Feb 16, 2018, at 09:40 , Bob Sneidar <bobsneidar at iotecdigital.com> wrote:
>> 
>> Hi all. 
>> 
>> Given:
>> 
>> on mouseUp
>>  put the dgDataOfIndex [1] of group "dgPODetail" into aDetailRecord
>>  put printKeys(aDetailRecord) into tPrintKeys
>>  set the numberFormat to "0.00"
>>  put aDetailRecord ["poitemqty"] * aDetailRecord ["poitemunitprice"] into tExtPrice
>>  put tExtPrice * (aDetailRecord ["poitemdiscount"] /100) into tDiscount
>>  put tExtPrice -  tDiscount into tItemExtPrice
>>  put round(tItemExtPrice, 2) into aDetailRecord ["poitemextprice"]   
>>  put printKeys(aDetailRecord) into tPrintKeys
>>  put aDetailRecord ["podetailid"] into tpodetailid
>>  dispatch findIndex to group "dgpodetail" with "podetailid", tpodetailid
>>  put the result into tDetailIndex
>>  set the dgDataOfIndex [tDetailIndex] of group "dgPODetail" to aDetailRecord -- NOT WORKING
>>  put the dgDataOfIndex [1] of group "dgPODetail" into aDetailRecord
>>  put printKeys(aDetailRecord) into tPrintKeys
>> end mouseUp
>> 
>> Note the three printKeys() outputs. The first produces a key value pair poitemextprice: 89.99
>> The second produces a key value pair poitemextprice: 179.98 as it should fter the calculation. 
>> 
>> Then I set the dgDataOfIndex [1] (the only record in the datagrid) to the array for that record. The datagrid DOES NOT UPDATE. The third print keys produces poitemextprice: 89.99
>> 
>> This has GOT to be a bug. If anyone wants to try to reproduce this, here are the datagrid params. Enter whatever values you want:
>> 
>> dgProp[columns]
>> podetailid
>> poitemqty
>> vendorpartnumber
>> poitemdescrip
>> poitemunitprice
>> poitemextprice
>> poitemdiscount
>> 
>> dgProp[column labels]
>> ID
>> Qty
>> Part#
>> Description
>> Unit Price
>> Ext Price
>> Disc %
>> 
>> dgProp[column widths]
>> 40,40,85,306,100,100,53
>> 
>> 
>> Bob S
>> 
> 





More information about the Use-livecode mailing list