Focus
29-Apr-2015, 05:30 AM
If you add the following code to the Customer.vw inside oComments_TP tab page in the 18.1 sacred texts
Object oButton1 is a Button
Set Location to 78 6
Set Label to 'Test'
Set peAnchors to anBottomLeft
Procedure OnClick
String sTest
Get Field_Current_Value of Customer_DD Field Customer.Comments to sTest
End_Procedure
End_Object
Set a break point on the Get Field_Current_Value....
Compile and Run
Open the Customer View
Find record 1
Click on Comments tab
Click the Test button
Step over and you will see the value in sTest which should start with "Innovative" has been corrupted
If you do this same test in 18.0 OrderEntry it works fine
As a work around you can do this
Procedure OnClick
String sTest
UChar[] ucData
Get_Field_Value (RefTable(Customer)) (RefTable(Customer.Comments)) to ucData
Move (UCharArrayToString(ucData)) to sTest
End_Procedure
So there appears to have been a change in behavior between 18.0 and 18.1 when Field_Current_Value is used to retrieve data from a DF_TEXT field
Object oButton1 is a Button
Set Location to 78 6
Set Label to 'Test'
Set peAnchors to anBottomLeft
Procedure OnClick
String sTest
Get Field_Current_Value of Customer_DD Field Customer.Comments to sTest
End_Procedure
End_Object
Set a break point on the Get Field_Current_Value....
Compile and Run
Open the Customer View
Find record 1
Click on Comments tab
Click the Test button
Step over and you will see the value in sTest which should start with "Innovative" has been corrupted
If you do this same test in 18.0 OrderEntry it works fine
As a work around you can do this
Procedure OnClick
String sTest
UChar[] ucData
Get_Field_Value (RefTable(Customer)) (RefTable(Customer.Comments)) to ucData
Move (UCharArrayToString(ucData)) to sTest
End_Procedure
So there appears to have been a change in behavior between 18.0 and 18.1 when Field_Current_Value is used to retrieve data from a DF_TEXT field