Skip to main content
Version: 8.1

Configure the column paths

Level: intermediate

Column path relative to the root schema

  • The root schema: [Contact].
  • The column that contains the contact address: Address.
Example that creates an EntitySchemaQuery query to return the values of this column
/* Create an instance of the EntitySchemaQuery class with the Contact root schema. */
var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName: "Contact"
});
/* Add an Address column, set its alias to Address. */
esq.addColumn("Address", "Address");

Column path that uses the direct connections

  • The root schema: [Contact].
  • The column that contains the account name: Account.Name.
  • The column that contains the name of the account’s primary contact: Account.PrimaryContact.Name.
Example that creates an EntitySchemaQuery query to return the values of these columns
/* Create an instance of the EntitySchemaQuery class with the Contact root schema. */
var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName: "Contact"
});
/* Add an Account lookup column. Then add the Name column from the Account schema linked to the Account lookup column. Set the alias of the Name column to AccountName. */
esq.addColumn("Account.Name", "AccountName");
/* Add an Account lookup column. Then add the PrimaryContact lookup column from the Account schema linked to the Account lookup column. Then add the Name column from the Contact schema linked to the PrimaryContact lookup column. Set the alias of the Name column to PrimaryContactName. */
esq.addColumn("Account.PrimaryContact.Name", "PrimaryContactName");

Column path that uses the reverse connections

  • The root schema: [Contact].
  • The column that contains the name of the contact who added the city: [Contact:Id:CreatedBy].Name.
Example that creates an EntitySchemaQuery query to return the values of this column
/* Create an EntitySchemaQuery class instance with the Contact root schema. */
var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName: "Contact"
});
/* Join another Contact schema to the root schema by the Owner column and select the Name column from the schema. Set its alias to OwnerName. */
esq.addColumn("[Contact:Id:Owner].Name", "OwnerName");
/* Join the Contact schema to the Account lookup column by the PrimaryContact column and select the Name column from the schema. Set the alias of the Name column to PrimaryContactName. */
esq.addColumn("Account.[Contact:Id:PrimaryContact].Name", "PrimaryContactName");