List Tables

The list_tables tool lists the tables of one kind that you can query, for example all Datamarts or all Product Extensions. For each table, the tool returns the identifiers to use in the Get Table Fields, Query Analytics Data, and Query Business Data tools.

Tool Name – list_tables

Title – List Tables

Type – Private

Access Profile – Operator

Permissions

The tool is available to the Operator access profile when tool access control is on. The list_tables tool uses your Pricefx permissions and lists only the tables that you have permission to query. For the modelTable kind, the tool lists only the tables of a Model Object that your user groups are allowed to view.

Parameters

Parameter

Required

Description

kind

Yes

The kind of table to list, for example datamart or productExtensionRows. The values are described in the Table Kinds table on this page.

filter

No

Text to narrow the list. The tool returns the tables whose identifiers or label contain this text. The comparison ignores case.

Default: Empty, which lists every table of the kind.

model

Only for modelTable

The unique name of the Model Object whose tables to list. The tool ignores model for every other kind.

Table Kinds

Kind

Tables

Query Tool

datamart

Datamarts

query_analytics_data

dataSource

Data Sources

query_analytics_data

rollup

Rollups

query_analytics_data

modelTable

Tables of a Model Object

query_analytics_data

products

Products (Product Master)

query_business_data

customers

Customers (Customer Master)

query_business_data

sellers

Sellers (Seller Master)

query_business_data

productCompetitions

Product Competition

query_business_data

productReferences

Product References

query_business_data

productBillOfMaterials

Product Bills of Materials

query_business_data

productExtensionRows

Product Extensions

query_business_data

customerExtensionRows

Customer Extensions

query_business_data

sellerExtensionRows

Seller Extensions

query_business_data

When Pricefx enables pricing tables for your partition, the following kinds are also available, all read by query_business_data:

Kind

Tables

priceLists

Price Lists

priceListLineItems

Line items of a Price List

priceGrids

Live Price Grids

priceGridLineItems

Line items of a Live Price Grid

calculationGrids

Calculation Grids

calculationGridLineItems

Line items of a Calculation Grid

companyParameterTables

Company Parameter tables

companyParameterRows

Rows of a Company Parameter table

conditionRecords

Condition Records of a Condition Record Set

Output

The list_tables tool returns an object with the following fields.

Field

Description

kind

The kind that was listed.

queryTool

The name of the tool that queries tables of this kind: query_analytics_data or query_business_data.

tables

The matching tables, at most 200. Each table has the fields in the Table Fields table on this page.

truncated

true when more than 200 tables match. To see the others, narrow the list with filter.

Table Fields

Field

Description

tableId

The first identifier of the table. Use it as table_id in the other tools. Empty when the kind needs no identifier.

tableId2

The second identifier of the table. Use it as table_id_2 in the other tools. Empty when the kind needs no second identifier.

label

The display name of the table.

description

The business description of the table. Present only when the partition has one.

rowCount

The number of rows. Present only for modelTable tables.

Behavior and Limitations

  • For a kind with one table per partition, for example products or customers, the list_tables tool returns one entry with empty identifiers.

  • The list_tables tool returns at most 200 tables per call.

  • For Datamarts and Data Sources, label is the display name. For Price List, Live Price Grid, and Calculation Grid line items, label is the name of the Price List, Live Price Grid, or Calculation Grid. For other kinds, label is the first identifier.

  • For the modelTable kind, the list_tables tool lists the tables of one Model Object only. The model parameter names that Model Object.

  • The list_tables tool leaves out a table that has no value for a required identifier.

  • Quotes, Contracts, rebate line items, Rebate Records, compensation tables, claims, action items, and Custom Forms are not available as table kinds.

Errors

Situation

Error Message

kind is not an available table kind

Unsupported table kind 'X'. Please use one of: Y.

kind is modelTable and model is empty

Listing modelTable needs `model`: the unique name of the Model Object.

No Model Object with the name in model exists, or you do not have access to it

No Model Object named 'X' is available to you.