I am running a saved update operation and a saved post operation from a button script on a form. But the errors I am getting involve dbsum() and tablesum() - which I am not using. I tried creating a new button but got the same thing.
Here's my script: Note the update is clearing the fields Ok, so my guess is it's the post operation. When run from the control panel with the same filter it works fine - just not from a button.
Checked my form events and object tab order - nothing noteworthy there.
Searched in the code explorer and no scripts were found using those functions.
Here's my script: Note the update is clearing the fields Ok, so my guess is it's the post operation. When run from the control panel with the same filter it works fine - just not from a button.
Code:
'Clear Yarn Item QOH then Repost all tx for this Yarnid if parent.mode_get() <> "VIEW" then parent.commit() end if dim global get_yarnid as c = "" dim codestr as c = "" dim fltr as c = "" get_yarnid = alltrim(yarn_id.value) fltr = "Yarn_Id = "+quote(var->get_yarnid) fltr = convert_expression(fltr,"V") on error goto ERRMSG 'Clear YARN_ITEM postings :Update.run_silent("Clear Yarn QOH",fltr) [COLOR="#FF0000"]'Post YARNTX[/COLOR] fltr = "YarnId = "+quote(var->get_yarnid) fltr = convert_expression(fltr,"V") codestr = <<%str% :Post.run("Post Tx","",fltr) %str% on_xbasic_idle(codestr) 'Update current record ALLOCATE & INSTOCK fields w/ calc fields dim hdr as p dim r as p hdr = table.current() r.allocate = alloc.value r.instock = ggstock.value hdr.change_record(r) end ERRMSG: commit_flag = .f. script_play("ERRMSG") on error goto 0 resume next
Searched in the code explorer and no scripts were found using those functions.
Comment