Tc Query
This Snap provides the functionality to execute any so called saved query in Teamcenter. The Snap is processing the data input, which can be used to specify the query and query criteria according the needs.
Supported Accounts
- This is a Read-type Snap.
- Support for Ultra Tasks: Works in Ultra Tasks if Wrap result is selected.

Prerequisites
- A valid Teamcenter account with the required permissions.
Snap views
| Type | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input |
Optional.This Snap has at the most one document input view. The required input of the snap is the Query Key and query criteria defined for saved query in Teamcenter. |
|
| Output |
This Snap has exactly one document output view. The output of the snap is the result of the saved query execution from Teamcenter. |
|
| Learn more about Error handling. | ||
Examples
Tc Query: Simple input exampleSnap settings
| Field/Field set | Description |
|---|---|
Label
String |
Specify a unique name for the Snap. Modify this to
be more appropriate, especially if there are more than one of the same Snap in the
pipeline.
Default value: Tc Query |
Configure policy
Checkbox |
Select this checkbox to run the Snap with a specific named Teamcenter policy. A policy determines the set of object properties that Teamcenter returns. Learn more: Configure policy. Default status: Deselected |
Configure session context
Checkbox |
Select this checkbox to run the Snap with a group, role, or project other than the one configured in the account. Learn more: Configure session context. Default status: Deselected |
Query Key*
String/Expression/ Suggestion |
Specify the key name of the query that you want the Snap to execute in Teamcenter. Default value: N/A Example: Item Revision… |
Max Items*
Integer/Expression |
Specify the maximum number of results that you want in the output of the query. (0 for unlimited) Default value: 0 Example: 10 |
Use manual limit
Checkbox/Expression |
Use manual result limit approach to handle read access problems. Default value: Unselected Example: Selected |
Query Criteria Path
String/Expression |
Specify the JSON path of the attributes in the JSON input document which shall be used as query criteria. In JSON document the content for path can look like this:
Names of the JSON properties have to be valid properties for the defined Saved Query in Teamcenter. Default value: N/A Example: $.attributes |
| Query Criteria |
Specify the Key Name and the Key Value of the query that you want the Snap to execute from Teamcenter. Each criteria must be specified as a new row. Click :add: to add a row. In case Query Criteria Path is configured to use attributes given in JSON input document these Query Criteria are used additionally. If an attribute is in the input document and the list given in Snap, the value of Snap attribute is taken. |
Name*
String/Expression/ Suggestion |
Specify the name of the query criteria. Default value: N/A Example: ItemID |
Value*
String/Expression |
Specify the value of the query criteria. Default value: N/A Example: 051575 |
Wrap result
Checkbox/Expression |
Result can contain multiple elements, and these can be given back in one document containing “result” object with list of elements or as multiple documents for each element.
Response contains document for each element. Works not in Ultra Tasks Default value: Unselected Example: Selected |
Configure error handling
Checkbox |
Select this checkbox to define how the Snap behaves when Teamcenter returns an error. Use these settings for analysis and debugging. Learn more: Configure error handling. Default status: Deselected |
Simplified expand
Checkbox |
Select this checkbox to make the Snap look for the name given in
Expand Attributes Path in the input document (for example,
When deselected, configure Expand Attributes Path as a string or an expression. Default status: Deselected |
Expand Attributes Path
String/Expression |
Specify the JSON path to the expand attributes in the input document. Expand attributes are the list of attributes that the Teamcenter response must contain. Each name must be the technical name of a valid property in the Teamcenter data model for the expected objects. For example:
Learn more: Configuring Expand Attributes. Default value: N/A Example: $.expandAttributes |
Build reference/lov documents
Dropdown list/Expression |
Select how the Snap represents references and lists of values (LOVs) that
Teamcenter returns. The Snap can return them as nested JSON objects instead of
flattened IDs and internal values with additional
The available options are:
Default value: Use Default Example: Yes |
Configure output
Checkbox |
Select this checkbox to specify the Teamcenter properties that the Snap includes in the output. This Snap offers the output settings described in Variant: type and reference related fields for suggestion. Default status: Deselected |
Snap execution
Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
|