Child pages
  • JSRelationItem

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#foreignColumnName]
The name of the column from the destination table
that this relation item is based on.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#operator]
The operator that defines the relationship between the primary dataprovider
and the foreign column.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#primaryDataProviderID]
The name of the column from the source table 
that this relation item is based on.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[UUIDObject]{td}{td}[#getUUID#getDesignTimeProperty]\()
Returns the UUIDGet a design\-time property of thisan componentelement.{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{thtbody}{tr}{td}[UUID]{td}{td}[#getUUID]\()
Returns the UUID of this component.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#putDesignTimeProperty]\()
Set a design\-time property of an element.{td}{tr}{tbody:id=foreignColumnName|class=node}{tr:id=nametbody}{tr}{td}[Object]{td}{td}h6.foreignColumnName[#removeDesignTimeProperty]\()
Clear a design\-time property of an element.{td}{tr}{tr:id=destbody}{tdtable}{sub-section:foreignColumnName_des|text=|trigger=button}{sub-section}{sub-section:foreignColumnName_des|trigger=none|class=sIndent}The name of the column from the destination table
that this relation item is based on.{sub-section}{td}{tr}{builder-show:permission=edit\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=foreignColumnName|class=node}{tr:id=name}{td}h6.foreignColumnName{td}{tr}{tr:id=sncdes}{td}*Since*\\{sub-section:foreignColumnName_sncdes|text=|trigger=button}{sub-section}{sub-section:foreignColumnName_sncdes|trigger=none|class=sIndent}The Replacename withof version infothe column from the destination table
that this relation item is based on.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:foreignColumnName_prssnc|text=|trigger=button}{sub-section}{sub-section:foreignColumnName_prssnc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:foreignColumnName_retprs|text=|trigger=button}{sub-section}{sub-section:foreignColumnName_retprs|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:foreignColumnName_seeret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:foreignColumnName_seeret|trigger=none|class=sIndent}[String]{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:foreignColumnName_linksee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:foreignColumnName_linksee|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:foreignColumnName_samlink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:foreignColumnName_samlink|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', '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 = '<';
{code}{sub-section}{div}sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:foreignColumnName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:foreignColumnName_sam|trigger=none}{code:language=javascript}
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 = '<';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=operator|class=node}{tr:id=name}{td}h6.operator{td}{tr}{tr:id=des}{td}{sub-section:operator_des|text=|trigger=button}{sub-section}{sub-section:operator_des|trigger=none|class=sIndent}The operator that defines the relationship between the primary dataprovider
and the foreign column.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:operator_snc|text=|trigger=button}{sub-section}{sub-section:operator_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:operator_prs|text=|trigger=button}{sub-section}{sub-section:operator_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:operator_ret|text=|trigger=button}{sub-section}{sub-section:operator_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:operator_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:operator_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:operator_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:operator_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:operator_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:operator_sam|trigger=none}{code:language=javascript}
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 = '<';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=primaryDataProviderID|class=node}{tr:id=name}{td}h6.primaryDataProviderID{td}{tr}{tr:id=des}{td}{sub-section:primaryDataProviderID_des|text=|trigger=button}{sub-section}{sub-section:primaryDataProviderID_des|trigger=none|class=sIndent}The name of the column from the source table 
that this relation item is based on.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:primaryDataProviderID_snc|text=|trigger=button}{sub-section}{sub-section:primaryDataProviderID_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:primaryDataProviderID_prs|text=|trigger=button}{sub-section}{sub-section:primaryDataProviderID_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:primaryDataProviderID_ret|text=|trigger=button}{sub-section}{sub-section:primaryDataProviderID_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:primaryDataProviderID_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:primaryDataProviderID_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:primaryDataProviderID_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:primaryDataProviderID_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:primaryDataProviderID_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:primaryDataProviderID_sam|trigger=none}{code:language=javascript}
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 = '<';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getDesignTimeProperty|class=node}{tr:id=name}{td}h6.getDesignTimeProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getDesignTimeProperty{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getDesignTimeProperty_des|text=|trigger=button}{sub-section}{sub-section:getDesignTimeProperty_des|trigger=none|class=sIndent}Get a design\-time property of an element.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDesignTimeProperty_snc|text=|trigger=button}{sub-section}{sub-section:getDesignTimeProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getDesignTimeProperty_prs|text=|trigger=button}{sub-section}{sub-section:getDesignTimeProperty_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDesignTimeProperty_ret|text=|trigger=button}{sub-section}{sub-section:getDesignTimeProperty_ret|trigger=none|class=sIndent}[Object]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDesignTimeProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignTimeProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDesignTimeProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignTimeProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDesignTimeProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignTimeProperty_sam|trigger=none}{code:language=javascript}
var frm = solutionModel.getForm('orders')
var fld = frm.getField('fld')
var prop = fld.getDesignTimeProperty('myprop')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getUUID|class=node}{tr:id=name}{td}h6.getUUID{td}{tr}{tr:classid=lastDetailRowsig}{td}{td}{tr}{tbody}{tbody:id=operator|class=node}{tr:id=name}{td}h6.operatorspan:style=float: left; margin-right: 5px;}[UUID]{span}{span:id=iets|style=float: left; font-weight: bold;}getUUID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:operatorgetUUID_des|text=|trigger=button}{sub-section}{sub-section:operatorgetUUID_des|trigger=none|class=sIndent}The operator that defines Returns the relationshipUUID betweenof the primary dataprovider
and the foreign columnthis component.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:operatorgetUUID_snc|text=|trigger=button}{sub-section}{sub-section:operatorgetUUID_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:operatorgetUUID_prs|text=|trigger=button}{sub-section}{sub-section:operatorgetUUID_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:operatorgetUUID_ret|text=|trigger=button}{sub-section}{sub-section:operatorgetUUID_ret|trigger=none|class=sIndent}[StringUUID]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:operatorgetUUID_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:operatorgetUUID_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:operatorgetUUID_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:operatorgetUUID_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:operatorgetUUID_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:operatorgetUUID_sam|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);}
var criteriabutton_uuid = relationsolutionModel.newRelationItemgetForm('parent_table_id', '=', 'child_table_parent_id');
criteria.primaryDataProviderID = 'parent_table_text';
criteria.foreignColumnName = 'child_table_text';
criteria.operator = '<'"my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=primaryDataProviderID|class=node}{tr:id=name}{td}h6.primaryDataProviderID{td}{tr}{tr:id=des}{td}{sub-section:primaryDataProviderID_des|text=|trigger=button}{sub-section}{sub-section:primaryDataProviderID_des|trigger=none|class=sIndent}The name of the column from the source table 
that this relation item is based on.{sub-section}{td}{tr}{builder-show:permission=edittr}{tbody}{tbody:id=putDesignTimeProperty|class=node}{tr:id=name}{td}h6.putDesignTimeProperty{td}{tr}{tr:id=sncsig}{td}*Since*\\{sub-section:primaryDataProviderID_snc|text=|trigger=button}{sub-section}{sub-section:primaryDataProviderID_snc|trigger=none|class=sIndent} Replace with version info{sub-section{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}putDesignTimeProperty{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prsdes}{td}*Parameters*\\td}{sub-section:primaryDataProviderIDputDesignTimeProperty_prsdes|text=|trigger=button}{sub-section}{sub-section:primaryDataProviderIDputDesignTimeProperty_prsdes|trigger=none|class=sIndent}Set a design\-time property of an element.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=retsnc}{td}*ReturnsSince*\\{sub-section:primaryDataProviderIDputDesignTimeProperty_retsnc|text=|trigger=button}{sub-section}{sub-section:primaryDataProviderIDputDesignTimeProperty_retsnc|trigger=none|class=sIndent}[String] Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:primaryDataProviderIDputDesignTimeProperty_seeprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:primaryDataProviderIDputDesignTimeProperty_seeprs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:primaryDataProviderIDputDesignTimeProperty_linkret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:primaryDataProviderIDputDesignTimeProperty_linkret|trigger=none|class=sIndent}[Object]{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=samsee}{td}*Also see*Sample*\\{sub-section:primaryDataProviderIDputDesignTimeProperty_samsee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:primaryDataProviderID_sam|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', '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 = '<';
{code:putDesignTimeProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:putDesignTimeProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putDesignTimeProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:classid=lastDetailRowsam}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr*Sample*\\{sub-section:putDesignTimeProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:putDesignTimeProperty_sam|trigger=none}{code:language=javascript}
var frm = solutionModel.getForm('orders')
var fld = frm.getField('fld')
fld.putDesignTimeProperty('myprop', 'strawberry')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getUUIDremoveDesignTimeProperty|class=node}{tr:id=name}{td}h6.getUUIDremoveDesignTimeProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[UUIDObject]{span}{span:id=iets|style=float: left; font-weight: bold;}getUUIDremoveDesignTimeProperty{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getUUIDremoveDesignTimeProperty_des|text=|trigger=button}{sub-section}{sub-section:getUUIDremoveDesignTimeProperty_des|trigger=none|class=sIndent}Returns the UUIDClear a design\-time property of thisan componentelement.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getUUIDremoveDesignTimeProperty_snc|text=|trigger=button}{sub-section}{sub-section:getUUIDremoveDesignTimeProperty_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getUUIDremoveDesignTimeProperty_prs|text=|trigger=button}{sub-section}{sub-section:getUUIDremoveDesignTimeProperty_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getUUIDremoveDesignTimeProperty_ret|text=|trigger=button}{sub-section}{sub-section:getUUIDremoveDesignTimeProperty_ret|trigger=none|class=sIndent}[UUIDObject]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getUUIDremoveDesignTimeProperty_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUIDremoveDesignTimeProperty_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getUUIDremoveDesignTimeProperty_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUIDremoveDesignTimeProperty_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getUUIDremoveDesignTimeProperty_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUIDremoveDesignTimeProperty_sam|trigger=none}{code:language=javascript}
var button_uuidfrm = solutionModel.getForm("my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());'orders')
var fld = frm.getField('fld')
fld.removeDesignTimeProperty('myprop')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}