Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// build a list of the column numbers which have been edited. You can enhance this to account for errors, etc.
string ls_desc, ls_value, ls_d, ls_prev
integer li_rc
ls_desc = dwo.name + '.ID'
ls_d = describe(ls_desc)
ls_prev = getitemstring(row,'change')
IF IsNull(ls_prev) THEN ls_prev = ''
ls_value = ls_prev + '[' + ls_d + ']' // append new value
li_rc = this.setitem( row, 'change', ls_value)
IF (pos(change[0], '[' + describe('box3.ID') + ']') > 0, RGB(255,255,0),RGB(255,255,255))
dw_1.retrieve( )
dw_1.setredraw( False)
// get list of columns in the order they are displayed which may not be the same as their column number order
ll_max = Integer(dw_1.Object.DataWindow.Column.Count) // determine number of columns
FOR ll_i = 1 TO ll_max STEP 1
// only need the visible columns
IF dw_1.describe("#" + String(ll_i) + ".Visible") = '1' THEN
// first set the mode to opaque
ls_modstring = dw_1.describe( "#" + string(ll_i) + ".Name") + ".Background.Mode='0'"
ls_msg = dw_1.Modify(ls_modstring)
// set the color of the cells
ls_modstring = dw_1.describe( "#" + string(ll_i) + ".Name") + ".Background.Color = ~"536870912~t IF (pos(change[0],~'[~' + describe(~'" + dw_1.describe( "#" + string(ll_i) + ".Name") + ".ID~') + ~']~') > 0, RGB(255,255,0),RGB(255,0,255))~""
ls_msg = dw_1.Modify(ls_modstring)
END IF
NEXT
dw_1.setRedraw(true)