currently i have a column profile.acct_no on datawindow, where user select a customer account from the popup listing. Now the problem is, user can't clear the previous already selected account, it always shows the selected account, unless you select another account. User can clear column box and click saved, but when they go back to view it, the account shows again.
Now from the database, all the selected account id are register into a table call interco.acct_id, what i need to do is, code the event itemchanged where if the column profile.acct_no are null, then it will clear the account id from table interco.acct_id to 0.
What i already do is code the non-visual object business rule for the datawindow, at event ue_itemchanged_acct_no return none:
string s_value
s_value = invo_tm.uf_getcolumnstring( istr_vldmsg.l_row, istr_vldmsg.s_column )
if isnull( s_value ) or trim( s_value ) = '' then invo_tm.uf_setcolumn( istr_vldmsg.l_row, is_dirulealias + '.acct_id ', 0 )
end if
Problem is, the account still shows and the id won't change to 0. Can anyone please help and advice? Much appreciated. Thanks.
Item '' does not pass validation test
', then you can change that by clicking 'Empty string is NULL
' in the 'Edit' properties of the column. Also make sure you have a call to 'AcceptText' before saving. Otherwise, it is possible that the modifications are not accepted before proceeding to the save operation. – Marc Vanhoomissen