I created this form custom method to allow me to only update the field
if the value has changed. This replaces lots of unconditional REPLACEs
in a form.
LPARAMETERS tcTable, tcField, tvValue
LOCAL lvCurrent as Variant
lvCurrent = EVALUATE(tcTable + "." + tcField)
IF lvCurrent <> tvValue THEN
REPLACE (tcField) WITH (tvValue) IN (tcTable)
ENDIF
(This is in theory yet...implementing it soon.)
So instead of
REPLACE order.cost4des WITH 'Fuel Surcharge'
I call
thisform.UpdateTableValue('order','cost4des','Fuel Surcharge')
On 10/2/2019 2:14 PM, MB Software Solutions, LLC wrote:
We've seen this before (and I did it 2 decades ago): REPLACE
MyTable.MyField with SomeOtherTable.SomeField
The implication is that "replace the MyField value in the MyTable
table." But if one doesn't use the IN clause, will there ever be any
chance that the update to MyTable.MyField would fail?
tia,
--Mike
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.