- 17 Oct 2024
- 1 Minute to read
- Print
- DarkLight
Querying User Exension Fields & Tables
- Updated on 17 Oct 2024
- 1 Minute to read
- Print
- DarkLight
Introduction
CMiC offers unlimited user defined fields to help users tailer CMiC screens (programs) to business requirements. This guide provides instructions on how to utilize the CMiC APIs to fetch User Defined Field and User Defined Table.
CMiC User Extension Endpoints
A User Extension (UE) field can be any type of pre-defined field. User extension fields are extensions of CMiC screens to allow users to add fields on top of CMiC’s standard UI logic.
There are a variety of API functionality CMiC offers to integrate using CMiC User Extensions. The following are available API Endpoints:
• User Extension Values
• User Extension Definitions
• User Extension Tables
User Extension Definitions
Used to query a user defined field assigned on a CMiC Enterprise object.
Endpoint:
sys-rest-api/rest/1/sdobjusrextdef?finder=RowFinder; TableName=<Table>,ObjectKey1=<CompCode>,ObjectKey2=<JobCode>
Example:
https://{add CMiC domain}/{add CMiC server}//sys-rest-api/rest/1/sdobjusrextdef?finder=RowFinder;TableName=PMPROJECT_TABLE
User Extension Values
Once the User Extension Definition has been created in CMiC, the value can be created, retrieved or updated. In this section we cover User Extension Values.
We begin with the query endpoint to retrieve a list of UE Fields for a specific CMiC object and keys. The following endpoint with recommended finder can be utilized.
Endpoint:
/sys-rest-api/rest/1/uevalidfielddata? finder=SdObjUsrExtValueFinder;{SchemaName}=<schemaNameValue>,{TableName}=<tableNameValue>,ObjectKey1=<objectKey1Value>,ObjectKey2=<objectKey2Value>,ObjectKey3=<objectKey3Value>,ObjectKey4=<objectKey4Value>
Example:
https://{add CMiC Domain}/{add CMiC server}/sys-rest-api/rest/1/sdobjusrextvalue?finder=SdObjUsrExtValueFinder;SchemaName=DA,TableName=PYEMPLOYEE_TABLE,ObjectKey1=1407
Retrieve User Defined Values API
User Extension Table (UTE)
User extension functionality extends the functionality of the CMiC software by creating a custom input fields. These input fields are attached to custom tables. Once the required extension fields have been created, tables need to be created that can store the data. From there CMiC APIs can query the valid data stored against these UTE fields.
UTE, when enabled, can be found under the Program header within CMiC’s web application.
Endpoint:
/sys-rest-api/jersey/v1/userextensions/EMP401K
Example:
https://{add CMiC domain}/{add CMiC server}/sys-rest-api/jersey/v1/userextensions/EMP401K