getDefaultColumns(payload)
Retrieves the default columns for a table displaying case data.
Returns
A Promise that resolves to a response containing information for the default columns.
Parameters
Name | Type | Description | Required |
payload | object | An object that specifies the report to retrieve the columns to be used as the default fields of a data entity. | ✅ |
The following table contains the properties of the payload object:
Name | Type | Description | Required |
reportName | string | The name of the report in which the default columns are configured. | ✅ |
className | string | The class of the report in which the default columns are configured. | ✅ |
Usage example
In this example, the API returns a Promise that resolves to a response containing information for the default columns.
const payload = { className: "OZ1CUU-MyApp-Work-MyCase", reportName: "DataTableEditorReport" };
PCore.getAnalyticsUtils().getDefaultColumns(payload).then(response => { console.log(response.data); }).catch(() => { ... });
// console output: [{ pyFieldName: "pzInsKey" }, { pyFieldName: "pyID" }, { pyFieldName: "columnName" } ]
Previous topic getDataViewMetadata(dataViewName, skipStoreCheck) Next topic getFieldsForDataSource(dataViewName, skipStoreCheck)