getDataViewMetadata(dataViewName, context)
Obtains the metadata of a data view.
Returns
The metadata as a Promise.
Parameters
Name | Type | Description | Required |
dataViewName | string | The name of the data view whose metadata must be obtained. | ✅ |
context | string | The name of the context where the API is being called. | ✅ |
Usage example
In this example, the API returns the metadata of the data view whose name is
D_BugList
.
const dataViewName = "D_BugList"
PCore.getDataApiUtils().getDataViewMetadata(dataViewName);
//The response of this API is as shown below.
{
"classID": "PegaProjMgmt-Work-Bug",
"className": "Bug",
"structure": "List",
"isQueryable": true,
"fields": [
{
"description": "operator who manager assigns work to",
"fieldID": "pyAssignedOperator",
"fieldType": "Identifier",
"isReadOnly": false,
"name": "Assigned To",
"dataType": "Identifier"
},
{
"description": "This property is used to identify the work object's parent
Backlog and should include the pyID of that work object. In the future,
it will be derived from the user's data input into UserStoryIDEntry or
based upon the context of the creation of the item.",
"displayAs": "pxTextInput",
"fieldID": "BacklogID",
"fieldType": "Text (single line)",
"isReadOnly": false,
"name": "Backlog ID",
"maxLength": 32,
"dataType": "Text"
}
]
}
Previous topic getData(dataViewName, payload, context, options) Next topic getListCount(dataViewName, payload, context)