Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't change field value

Status
Not open for further replies.

jartman

Programmer
Oct 16, 2001
34
US
I have a field I'm trying to update in objectPAL but it won't change. No error message is generated. The field is a link between an ORDERS table and a packing list (PL) table. It keeps track of which line item in the order a particular line item on the PL fulfills.

When someone edits the part number on a pre-existing packing list detail record, my code searches for a matching part number on the order and links the PL detail record to it. The relevant code is something like this (in PLdetail.PN.changeValue):

PLtc.attach(self)
ORDERStc.locate("PN",self.newvalue)
PLtc.ITEM = ORDERStc.ITEM ; this line has no effect

The only thing odd here is that the ITEM number is not part of the record UIObject on the packing list form, but it exists in the underlying table.

My other thought was that maybe I can't edit a record within changeValue because it's part of the record posting process. So I tried doing doDefault and unlockRecord first, but it still didn't work.
 
Have you tried testing for success in the locate statement?

Assuming that you are going to find a record isn't a good idea.

if not ORDERStc.locate("PN",self.newvalue) then
errorshow()
return
endif


Tony McGuire
"It's not about having enough time. It's about priorities
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top