<< Click to Display Table of Contents >> Navigation: »No topics above this level« TOC : OZ e-Form Extension > OZ e-Form JavaScript API > Input > TextBox > Method >IsDataSetValueNull |
Indicates whether the field value is null.
Prototype :
bool IsDataSetValueNull
(
string FieldPath,
[ bool IgnoreGrouping ]
)
Arguments :
FieldPath |
Field Path setup depends on the field type |
IgnoreGrouping |
Whether to ignore grouping If not set, applies as false |
Reference :
Refer to GetDataSetValue function for how to set the field path.
To get whether the data field in the dataset cursor index is null, set IgnoreGrouping to true.
Example :
//Data field (ODI name : Sample, dataset name : Orders, field name : Price)
if(This.IsDataSetValueNull("Sample.Orders.Price") == true) {
_TraceLn("null");
else {
_TraceLn(This.GetDataSetValue("Sample.Orders.Price"));
}
//Data field (ODI name and dataset name can be omitted)
if(This.IsDataSetValueNull("Orders.Price") == true) { //omit ODI name
//if(This.IsDataSetValueNull("Price") == true) { //omit ODI name and dataset name
_TraceLn("null");
else {
_TraceLn(This.GetDataSetValue("Orders.Price")); //omit ODI name
//_TraceLn(This.GetDataSetValue("Price")); //omit ODI name and dataset name
}
//ODI parameter field (ODI name : Sample, ODI parameter field name : TotalAmount)
if(This.IsDataSetValueNull("Sample.OZParam.TotalAmount") == true) {
_TraceLn("null");
else {
_TraceLn(This.GetDataSetValue("Sample.OZParam.TotalAmount"));
}
//ODI parameter field (ODI name can be omitted)
if(This.IsDataSetValueNull("OZParam.TotalAmount") == true) {
_TraceLn("null");
else {
_TraceLn(This.GetDataSetValue("OZParam.TotalAmount"));
}
//form parameter field(form parameter field name : Quantity)
if(This.IsDataSetValueNull("OZFormParam.Quantity") == true) {
_TraceLn("null");
else {
_TraceLn(This.GetDataSetValue("OZFormParam.Quantity"));
}
Available Events :
All Events
The IsDataSetValueNull function can be used in all events. But the Data Field and the ODI Paramater Field returns the wrong value or script error, depending on the event. Restrictions on the event, please refer to JavaScript Events topic. |
See also :