Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
put fld "xxxx" into txxxx
put fld "fstock" into tfstock
subtract txxxx from tfstock
#put (fld "fstock" - fld "xxxx") into fld "fstock"
put tfstock into tstock
put tstock into theDataA["stock"]
Such a simple thing (!!) it would seem, but it's cost me many frustrating minutes, without success.
Please help.
put fld "xxxx" & TAB into tCode
put the dgtext of grp "datagrid 3" into tText
put lineoffset(tCode,tText) into tline
if tLine = 0 then
beep
answer "No such code!"
exit to top
end if
put line tLine of tText into tFoundLine
#put tfoundline into fld "xxxx"
set itemdel to TAB
set the dghilite of grp "datagrid 3" to tfoundline
put the dgHilitedLines of group "Datagrid 3" into theLine
put the dgDataOfLine[theLine] of group "Datagrid 3" into theDataA
put theDataA["stock"]into fld "fstock"
put fld "xxxx" into txxxx
put fld "fstock" into tfstock
subtract txxxx from tfstock
#put (fld "fstock" - fld "xxxx") into fld "fstock"
put tfstock into tstock
put tstock into theDataA["stock"]