xupengkun
20th December 2007, 02:22
i use the list scripts

stpapi.put.field("tffam1510m000", "tffam110.anbr", str$(anbr))
stpapi.put.field("tffam1510m000", "tffam110.aext", str$(aext))
stpapi.put.field("tffam1510m000", "tffam110.book", str$(book))
ret.code = stpapi.find("tffam1510m000", err.desc)
if ret.code = 1 then
ret.sync = stpapi.synchronize.dialog("tffam1510m000", "modify", error.sync)
stpapi.get.field("tffam1110s000","tffam110.cost", emm.unit)
stpapi.get.field("tffam1110s000","tffam110.ltdd", emm.unit2)
stpapi.get.field("tffam1110s000","form.netb", emm.unit1)
endif
stpapi.end.session("tffam1510m000", end.msg)

the emm.unit1 return result is 0

mark_h
20th December 2007, 15:11
I do not know anything about Baan 5, but which field does emm.unit1 map to on the session? Is it the input field or is the display field out to the right of the input fields? Are emm.unit and emm.unit2 correct? You might also what to get the fields you put - just to confirm you are finding the correct record.

Is there something more that goes on around this little function server you have written? Wouldn't it be just as easy to do a select on the table to find the record in question and retrieve the info that way? Just curious about why this method was selected versus the direct query.