Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Selects content from a Perfion database via the Perfion API Query Syntax. Output can be generated both as Xml and in the neutral Table format.

Properties

From

Must contain (or reference) a connection string, in one of the following ways:

  • Name of a Data Source.
    This data source must contain a connection string. This can be defined using the SET command.

  • Complete Connection string
    Data Source=localhost;User ID=perfion;Password=mypw;Initial Catalog=perfiondb; PerfionUserID=admin;PerfionPassword=pswd;PerfionLanguage=EN;

  • Lookup from a named Connection defined in Perfion
    Go to Administration -> Remote Connections to see defined connections.
    e.g. @REMOTECONNECTIONNAME=Dynamics BC Conn

  • Reference to current Perfion database
    Just type a '.' (period) in the From field

To

Name of the Output Data Source.
The output format can be in Xml-format or Table format depending on @Format parameter and whether a Mapping is defined.

Script

The Perfion API Query used to query the Perfion database.

The API-Query can also be defined dynamically by including parameter references. The parameter values are evaluated in the same way as the script method FillTemplate.

The Perfion Query need to follow the XML encoding and chars like ' need to be replaced with ' The method System.Security.SecurityElement.Escape(xmlString) can do the encoding.
Example 1:
<Clause id='ExteriorColor' operator='=' value='{=$Color}' />

Remark from Perfion 2023R1: If you combine parameters with other curly brackets you need to escape the curly brackets with double curly brackets like: <Clause id='{{ID' operator='=' value='{=$Color}' />
Example 2:
If you want to create the entire query dynamically, simply just include a reference to the parameter containing the query such as:
{=$MyQuery}

Parameters

@Format

Specifies the output format of the Command (if relevant).

Note: This parameter is ignored if a Mapping is defined. In which case data will always be delivered in Table-format (as defined by the Mapping).

Recommendation: Use a mapping. This parameter was included before it was possible to create a mapping. A mapping is much more powerful as it allows you to select all data and attributes.

There are several format options which can be used to change the output format to Table-format. This format will only contain the data values from Perfion, and not all the enhanced information from the XML found in attributes and metadata about features etc. Moreover, based on which option is chosen one can choose how the data table headers and data will be handled:

  • Table – Table headers will use feature captions

  • TableForReimport – Table data and headers will be selected to match the Perfion feature data import format

  • TableForReimportByPerfionId – Table data and headers will be selected to match the Perfion feature data import format which uses Perfion IDs instead of values.

XML-output:
If not included or left blank, and no mapping is defined, the output will be an XML document in the normal Perfion syntax delivered by the API, with all the detailed elements and attributes.

@Filter

Filter the result of the selected data. See Command Maps & Parameters for more information.

@Order

Order the result of the selected data. See Command Maps & Parameters for more information.

@ExcludeBinaryRelativePath

When using one of the Table output formats, this parameter will, when set, exclude the relative path for binaries (files and images).
The relative path defaults to '\' but may be specified using the BinaryRelativePath parameter.

This parameter is available from Perfion 2023-R1 SR2

@BinaryRelativePath

This parameter allows you to specify a relative path (defaults to '\'. ) to be outputted for binary features, when using one of the Table output formats. Output of a relative path may be omitted using the ExcludeBinaryRelativePath parameter.

This parameter is available from Perfion 2023-R1 SR2

Mapping

From

Name of a feature, property or feature + property from Perfion as requested by the Perfion API Query. Here are some examples:

  • Value - The base-value of the current Item

  • ID - The unique Perfion ID of the current Item

  • CreatedDate - The date the current Item was created

  • Brand - The brand of the current Item

  • Vendor - The value of the Vendor feature

  • Vendor.id - The unique Perfion ID of the Vendor

  • Vendor.ModifedDate - The last modified date of the Vendor

  • EnginePower - The value of the EnginePower feature

  • Image - The unique Guid value of the Image feature

  • Image.Width - The width in pixels of the original Image stored in Perfion

  • Image.FileModifiedDate - The original ModifiedDate of the file before it was loaded to Perfion.

  • Image.ModifiedDate - The last ModifiedDate of Image

  • Image.FileSize - The FileSize of the original file stored as in Perfion

  • Image.FileName - The FileName as it is stored in Perfion.

Above are just examples. Refer to the API Query Reference guide for all the possible Property names attribute names and which ones are relevant for the current Item and features of different datatypes (e.g. string, number, images, files etc.)

For Multi-valued features, the values will be concatenated and separated by ';'

If a feature or property name is specified that does not exist in Perfion or is not delivered by the API Query it will be ignored, i.e. the mapping will not fail. This is by design as the data from Perfion can vary a lot.
All of the feature and property names are case-insensitive. However, the names of the output columns will have the same case as above, unless renamed in the To column of the Map.

To

Name of the Header as it should be called in the Output table
If unspecified it will automatically get its name from the input (e.g. From column).

Script

Note: This Command does not apply scripting. If you want to use scripting in relation to values, then pass the result to the SELECT or SELECT.UNIQUE command.

Guide

Most of the information found in the Perfion Xml output can be easily mapped by the above mapping. However, if for some reason you need to use some of the other information from the Perfion Xml output, then you will need to setup this Command to deliver the output in Xml-format, and then pass the result to one of the Commands that select data from Xml format.

  • No labels