TOC : OZ e-Form Extension > OZ e-Form JavaScript API > Input > TextBox > Method >

 

GetDataSetValue

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

 

GetDataSetValue

 

 

Gets the data value of the given field.

 

 

 

Prototype :

 

var GetDataSetValue

(

       string FieldPath,

       [ integer RowIndex ],

       [ bool IgnoreGrouping ]

)

 

 

 

Arguments :

 

FieldPath

Field Path setup depends on the field type

RowIndex

One-Based row Index

Row index is effective only when getting data field value

If not set, applies as null

IgnoreGrouping

Whether to ignore grouping

If not set, applies as false

 

 

 

Reference :

 

Return type is one of double, integer or string according to field type.

 

How to set field path according to field types :

 

Data field

"ODI name.dataset name.field name".

ODI name and dataset name can be omitted. If they are omitted, those of the band are default.

 

ODI parameter field

"ODI name.OZParam.field name"

ODI name can be omitted. If they are omitted, the one of the band is default.

 

Form parameter field

"OZFormParam.field name"

 

System field

"OZSystem.field name"

 

Resource field

"OZResource.field name"

Returns the resource value of the current language.

 

If the Band is grouped, the row index is applied to each group data, not all data.

 

To get the data values in the dataset cursor index, RowIndex is set to null and IgnoreGrouping is set to true.

 

 

 

Example :

 

//Data field (ODI name : Sample, dataset name : Orders, field name : Price)

  _TraceLn(This.GetDataSetValue("Sample.Orders.Price", 1)); //Data value of the 1st row

  _TraceLn(This.GetDataSetValue("Sample.Orders.Price", 3)); //Data value of the 3rd row

 

//ODI parameter field (ODI name : Sample, ODI parameter field name : TotalAmount)

  _TraceLn(This.GetDataSetValue("Sample.OZParam.TotalAmount"));

 

//form parameter field name : Quantity

  _TraceLn(This.GetDataSetValue("OZFormParam.Quantity"));

 

//system field

  _TraceLn(This.GetDataSetValue("OZSystem.Time"));

 

//resource field

  _TraceLn(This.GetDataSetValue("OZResource.Table_Title1"));

 

 

 

Available Events :

 

All Events

 

The GetDataSetValue function can be used in all events. But the Data Field, the ODI Paramater Field and the System Field(Page_Number, Total_Page, Page_Of_Total) returns the wrong value or script error, depending on the event.

Restrictions on the event, please refer to JavaScript Events topic.

 

 

 

See also :

 

JavaScript Events