Skip to content

Working with fields

Get single field - DV.getField("fn")

Get variable for a single field by passing a fieldname to .getField() method
Note: singular "getField"

1
2
3
// file: hooks/TABLENAME-dv.js
var dv = AppGiniHelper.dv;
var field = dv.getField("name");

Get multiple fields - DV.getFields(["fn1", "fn2", "..."])

Get multiple fields by name

Get variable for multiple fields by passing an array of fieldnames (string[]) to .getFields() method
Note: plural "getFields")

1
2
3
// file: hooks/TABLENAME-dv.js
var dv = AppGiniHelper.dv;
var fields = dv.getFields(["fieldname1", "fieldname2", ...]);

See also