Child pages
  • JSRelationItem
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

« Previous Version 34 Next »

Refresh page Mar 29, 2024 10:38

Return Types
JSRelationItem

Supported Clients
SmartClient WebClient NGClient

Constants Summary
String LITERAL_PREFIX Constant for using literals in solution model in relations.

Property Summary
String foreignColumnName The name of the column from the destination table that this relation item is based on.
String operator The operator that defines the relationship between the primary dataprovider and the foreign column.
String primaryDataProviderID The name of the column from the source table that this relation item is based on.
Object primaryLiteral Get the literal.

Methods Summary
UUID getUUID() Returns the UUID of this component.

Constants Details

LITERAL_PREFIX

Constant for using literals in solution model in relations. Strings must be passed as quoted value to make a distinction between string '5' and number 5.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

relation.newRelationItem(JSRelationItem.LITERAL_PREFIX + "'hello'",'=', 'mytextfield');
 

Property Details

foreignColumnName

The name of the column from the destination table that this relation item is based on.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var relation = solutionModel.newRelation('parentToChild', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
var criteria = relation.newRelationItem('parent_table_id', '=', 'child_table_parent_id');
criteria.primaryDataProviderID = 'parent_table_text';
criteria.foreignColumnName = 'child_table_text';
criteria.operator = '<';
&nbsp;

operator

The operator that defines the relationship between the primary dataprovider and the foreign column.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var relation = solutionModel.newRelation('parentToChild', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
var criteria = relation.newRelationItem('parent_table_id', '=', 'child_table_parent_id');
criteria.primaryDataProviderID = 'parent_table_text';
criteria.foreignColumnName = 'child_table_text';
criteria.operator = '<';
&nbsp;

primaryDataProviderID

The name of the column from the source table that this relation item is based on.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var relation = solutionModel.newRelation('parentToChild', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
var criteria = relation.newRelationItem('parent_table_id', '=', 'child_table_parent_id');
criteria.primaryDataProviderID = 'parent_table_text';
criteria.foreignColumnName = 'child_table_text';
criteria.operator = '<';
&nbsp;

primaryLiteral

Get the literal.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var relation = solutionModel.newRelation('parentToChild', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
var criteria = relation.newRelationItem(JSRelationItem.LITERAL_PREFIX + "'hello'",'=', 'myTextField');
criteria.primaryLiteral = 'literal_text';
//criteria.primaryLiteral = number;
var primaryLiteral = criteria.primaryLiteral;
&nbsp;

Methods Details

getUUID()

Returns the UUID of this component.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var button_uuid = solutionModel.getForm("my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());
&nbsp;

  • No labels