Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This configuration option allows you to specify a custom function to process CSV and Excel export values one at a time.

Parameters

  • cell info object - an object containing the following properties:
    • value - the original export value
    • bound value formatting - provides binding information, such as field name and data type
    • item properties - provides widget properties from which the value was derived; this allows you to determine the type of widget, the id of the widget, as well as other widget information
    • grid properties - provides information about the grid from which the data is exported
    • record number - the record number currently being exported

Return value

The function should return the adjusted value.

If nothing is returned, or the value of null or undefined is returned, the original export value will remain unchanged.

Example

pui["process export value"] = function(cellInfo) {
  // remove line breaks from HTML container exported values
  if (cellInfo["item properties"]["field type"] === "html container") {
    return cellInfo.value.replace(/<br>/g, "");
  }
}


  • No labels