Child pages
  • JSRelationItem
Skip to end of metadata
Go to start of metadata


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.

Method Summary
Object #getDesignTimeProperty()
Get a design-time property of an element.
UUID #getUUID()
Returns the UUID of this component.
Object #putDesignTimeProperty()
Set a design-time property of an element.
Object #removeDesignTimeProperty()
Clear a design-time property of an element.

Property Details
foreignColumnName
The name of the column from the destination table
that this relation item is based on.
Returns
String
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 = '<';
operator
The operator that defines the relationship between the primary dataprovider
and the foreign column.
Returns
String
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 = '<';
primaryDataProviderID
The name of the column from the source table
that this relation item is based on.
Returns
String
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 = '<';

Method Details
getDesignTimeProperty

Object getDesignTimeProperty ()

Get a design-time property of an element.
Returns
Object
Sample
var frm = solutionModel.getForm('orders')
var fld = frm.getField('fld')
var prop = fld.getDesignTimeProperty('myprop')
getUUID

UUID getUUID ()

Returns the UUID of this component.
Returns
UUID
Sample
var button_uuid = solutionModel.getForm("my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());
putDesignTimeProperty

Object putDesignTimeProperty ()

Set a design-time property of an element.
Returns
Object
Sample
var frm = solutionModel.getForm('orders')
var fld = frm.getField('fld')
fld.putDesignTimeProperty('myprop', 'strawberry')
removeDesignTimeProperty

Object removeDesignTimeProperty ()

Clear a design-time property of an element.
Returns
Object
Sample
var frm = solutionModel.getForm('orders')
var fld = frm.getField('fld')
fld.removeDesignTimeProperty('myprop')
  • No labels