Hi,
I use as a dataprovider in TEXT_FIELD a form variable . After some procedures I want set my providers to default values. For this purpose I use general procedure where I define all my variables in form and assign to it defaultValue :
var frm_vars = myForm.getFormVariables();
for (var i =0; i< frm_vars.length; i++) {
var frm_var = frm_vars*;*
tcontroller.setDataProviderValue(frm_var.name,frm_var.defaultValue);* When my form loaded first time all my text fields are empty, but when I reset my variables the default values appears in my Text_Fields: if my default value was null it show null in text_field , or if type of variable was string it will show double quote… How to exclude it ?
Normally, you would define a form variable, assign it a default value at declaration and bind it to the field. That’s all. But I guess you want to be able to initialize your default values at runtime depending on a specific situation? If so, in which event do you set the form variables?
Hi Omar
Yes, I created form variables and bind them with my Text_Field controls. On My form I have add button which handle by onAction event. After updating database I call my Global Function Reset Variables to clear my Text_Fields controls.
Also I call same Reset Method onShow form . From OnShow event I don’t have same problem when form Loaded.