getFieldValue

Gets a value to a specific field

Parameters

  1. controlId => String with the control id. Some controls (like Comboboxes) do have sub information. in that case the controlId is combined with a ".". e.g. comboBoxId.subcontrolId

Example Usages

let myText = "Hello World!";
app.setFieldValue("myControlId", myText);
value = app.getFieldValue("fieldId");
let myFieldId = "fieldId";
let value = app.getFieldValue(myFieldId);
let itemId = app.getFieldValue("itemCombobox"); //like any other control
let taxKeyId = app.getFieldValue("itemCombobox.itmTaxKeyId"); //get the itmTaxKeyId value of the selected entry in acomboBox
let itemName = app.getFieldValue("itemCombobox.itmName");
let taxKeyId = app.getFieldValue("itemList").itmTaxKeyId; //get the itmTaxKeyId value of the selected entry in a grid
let allRowsFromMyGrid = app.getFieldValue("itemList.allRows"); //get an array of all rows in a grid
let selectedRowsFromMyGrid = app.getFieldValue("itemList.selectedRows"); //get an array of all selected rows in a grid
let unselectedRowsFromMyGrid = app.getFieldValue("itemList.unselectedRows"); //get an array of all unselected rows in a grid
let myRowJsonObject = app.getFieldValue("itemList.clickedRow"); //get the clicked row as a json object (only valid in onRowClick and onCellClick events)
let myCellValue = app.getFieldValue("itemList.clickedCell"); //get the clicked cells formatted value (only valid in onCellClick events)
let myCellId = app.getFieldValue("itemList.clickedCellId"); //get the clicked cells id (only valid in onCellClick events)
for (let i = 0; i < allRowsFromMyGrid.length; i++) {
  console.log(allRowsFromMyGrid[i].itmTaxKeyId);
}
// Calendar
let type = app.getFieldValue('calendar.type');
let title = app.getFieldValue('calendar.title')
let activeStart = app.getFieldValue('calendar.activeStart');
let activeEnd = app.getFieldValue('calendar.activeEnd');
let currentStart = app.getFieldValue('calendar.currentStart');
let currentEnd = app.getFieldValue('calendar.currentEnd');

/*
    type             dayGridMonth
    title            September 2024
    activeStart      2024-09-03T00:00:00
    activeEnd        2024-10-13T00:00:00
    currentStart     2024-09-01T00:00:00
    currentEnd       2024-10-01T00:00:00
*/

For further information: Calendar Control

Return Values

The getFieldValue function returns the value of a form control specified by the controlId.

Last updated