Script.GetDataTable(TableName).GetRow(X).GetBoolean(Column)
.GetBoolean(Column) returns the Boolean value in the column specified for the DataRow object. This will return a true or false value.
Notes:
- If you provide a column that is not a Boolean column, you will receive a scripting error.
- While you can technically get the Boolean value of a column upon adding a row, it is typically used with the GetRow(X) method.
Applies To
- Event.Form.MainGrid.Results.AddRow([IDColumn])
- Event.Form.MainGrid.Results.GetRow(X)
- Event.Form.MainGrid.SelectedRow
- Event.Form.Parent.MainGrid.Results.AddRow([IDColumn])
- Event.Form.Parent.MainGrid.Results.GetRow(X)
- Event.Form.Parent.MainGrid.SelectedRow
- Event.Form.Parent.GetDataTable([TableName]).AddRow([IDColumn])
- Event.Form.Parent.GetDataTable([TableName]).GetRow(X)
- Event.Form.Parent.Grids(FID).Results.AddRow([IDColumn])
- Event.Form.Parent.Grids(FID).Results.GetRow(X)
- Event.Form.Parent.Grids(FID).SelectedRow
- Event.Form.GetDataTable([TableName]).AddRow([IDColumn])
- Event.Form.GetDataTable([TableName]).GetRow(X)
- Event.Form.Grids(FID).Results.AddRow([IDColumn])
- Event.Form.Grids(FID).Results.GetRow(X)
- Event.Form.Grids(FID).SelectedRow
- Inventory.LotExplosion(Lots[, View, EndDate, NegativeLots, ByProducts]).AddRow([IDColumn])
- Inventory.LotExplosion(Lots[, View, EndDate, NegativeLots, ByProducts]).GetRow(X)
- Parameters.Results.AddRow([IDColumn])
- Parameters.Results.GetRow(X)
- Query.GetTable(Query).AddRow([IDColumn])
- Query.GetTable(Query).GetRow(X)
- Script.GetDataTable(TableName).AddRow([IDColumn])
- Script.GetDataTable(TableName).GetRow(X)
Properties and Methods
None
Available
The .GetBoolean(Column) method is available in:
- 15.03.016
- All newer builds
Type
Boolean
Syntax
Script.GetDataTable(TableName).GetRow(X).GetBoolean(Column);
Parameters
|
Parameter |
Required |
Description |
|---|---|---|
|
Column |
Yes |
The column name in quotes that holds the Boolean value. |
Example
//--add this script to a button on the edit item master layout
var loTable = Script.GetDataTable('ePROD');
var lrRow = loTable.GetRow(0);
var llActive = lrRow.GetBoolean('pr_active');
Event.Form.MessageBox(`The pr_active field is set to: ${llActive}`);
/*
This will provide a prompt with the following message for an item number:
The pr_active field is set to: true
(Assuming the current item is active)
*/