TOC : Script API > JavaScript > JavaScript API > Component > PDFDocument > PDFPage > Method >

 

IsDataSetValueNull

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

TOC : Script API > JavaScript > JavaScript API > Component > PDFDocument > PDFPage > Method >

 

IsDataSetValueNull

 

 

Indicates whether the field value is null.

 

 

 

Prototype :

 

bool IsDataSetValueNull

(

        string FieldPath

)

 

 

 

Arguments :

 

FieldPath

Field Path setup depends on the field type

 

 

 

Reference :

 

Refer to GetDataSetValue function for how to set the field path.

 

 

 

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"));

  }

 

//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"));

  }

 

//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 :

 

GetDataSetValue

 

JavaScript Events