Child pages
  • JSRelation

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:class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[JSRelationItem]{span}{td}{tr}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#INNER_JOIN]
Constant for set/get the joinType of a JSRelation.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#LEFT_OUTER_JOIN]
Constant for set/get the joinType of a JSRelation.{td}{tr}{tbody}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#allowCreationRelatedRecords]
Flag that tells if related records can be created through this relation.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#allowParentDeleteWhenHavingRelatedRecords]
Flag that tells if the parent record can be deleted while it has related records.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteRelatedRecords]
Flag that tells if related records should be deleted or not when a parent record is deleted.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#foreignDataSource]
Qualified name of the foreign data source.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#foreignServerName]
The name of the server where the foreign table is located.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#foreignTableName]
The name of the foreign table.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#initialSort]
A String which specified a set of sort options for the initial sorting of data
retrieved through this relation.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#joinType]
The join type that is performed between the primary table and the foreign table.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#name]
The name of the relation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#primaryDataSource]
Qualified name of the primary data source.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#primaryServerName]
The name of the server where the primary table is located.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#primaryTableName]
The name of the primary table.{td}{tr}{tbody}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSRelationItem]\[]{td}{td}[#getRelationItems]\()
Returns an array of JSRelationItem objects representing the relation criteria defined for this relation.{td}{tr}{tbody}{tbody}{tr}{td}[JSRelationItem]{td}{td}[#newRelationItem]\(dataprovider, operator, foreinColumnName)
Creates a new relation item for this relation.{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E}{tr:id=name}{td}h6.INNER_JOIN{td}{tr}{tr:id=des}{td}{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_des|text=|trigger=button}{sub-section}{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_des|trigger=none|class=sIndent}Constant for set/get the joinType of a JSRelation. It is also used in solutionModel.newRelation(...).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_ret|text=|trigger=button}{sub-section}{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_see|text=|trigger=button}{sub-section}{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_see|text=|trigger=button}{sub-section}{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_sam|text=|trigger=button}{sub-section}{sub-section:07AF28A3423F1FA0-66C6EEA8-45AE4685-BEEE8328-FC31DC172C80CF77B620545E_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.joinType = JSRelation.LEFT_OUTER_JOIN;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6}{tr:id=name}{td}h6.LEFT_OUTER_JOIN{td}{tr}{tr:id=des}{td}{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_des|text=|trigger=button}{sub-section}{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_des|trigger=none|class=sIndent}Constant for set/get the joinType of a JSRelation. It is also used in solutionModel.newRelation(...).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_ret|text=|trigger=button}{sub-section}{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_see|text=|trigger=button}{sub-section}{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_see|text=|trigger=button}{sub-section}{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_sam|text=|trigger=button}{sub-section}{sub-section:326B4F431D08F099-3AD159A8-49AC44E9-AD4FBACE-730177BD1E6FD89F5EEBF0B6_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.joinType = JSRelation.LEFT_OUTER_JOIN;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA}{tr:id=name}{td}h6.allowCreationRelatedRecords{td}{tr}{tr:id=des}{td}{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_des|text=|trigger=button}{sub-section}{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_des|trigger=none|class=sIndent}Flag that tells if related records can be created through this relation.

The default value of this flag is "false".{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_ret|text=|trigger=button}{sub-section}{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_see|text=|trigger=button}{sub-section}{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_see|text=|trigger=button}{sub-section}{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_sam|text=|trigger=button}{sub-section}{sub-section:6565DC86B9805C2D-0F72AC45-44864EAB-A482BEB0-0D1BD82CFCB6502951991DBA_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.allowCreationRelatedRecords = true;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C}{tr:id=name}{td}h6.allowParentDeleteWhenHavingRelatedRecords{td}{tr}{tr:id=des}{td}{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_des|text=|trigger=button}{sub-section}{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_des|trigger=none|class=sIndent}Flag that tells if the parent record can be deleted while it has related records.

The default value of this flag is "true".{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_ret|text=|trigger=button}{sub-section}{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_see|text=|trigger=button}{sub-section}{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_see|text=|trigger=button}{sub-section}{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_sam|text=|trigger=button}{sub-section}{sub-section:9D6D38A75785B93B-BBA6F79C-4EF941F5-9414820C-9F7D5C04F724A5CCFA6CBC8C_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.allowParentDeleteWhenHavingRelatedRecords = false;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F}{tr:id=name}{td}h6.deleteRelatedRecords{td}{tr}{tr:id=des}{td}{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_des|text=|trigger=button}{sub-section}{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_des|trigger=none|class=sIndent}Flag that tells if related records should be deleted or not when a parent record is deleted.

The default value of this flag is "false".{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_ret|text=|trigger=button}{sub-section}{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_see|text=|trigger=button}{sub-section}{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_see|text=|trigger=button}{sub-section}{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_sam|text=|trigger=button}{sub-section}{sub-section:1FEA85A53FD6F762-A2161225-419544EC-97469A1B-AE19066118DDF8B708E4E63F_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.deleteRelatedRecords = true;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95}{tr:id=name}{td}h6.foreignDataSource{td}{tr}{tr:id=des}{td}{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_des|text=|trigger=button}{sub-section}{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_des|trigger=none|class=sIndent}Qualified name of the foreign data source. Contains both the name of the foreign
server and the name of the foreign table.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_ret|text=|trigger=button}{sub-section}{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_see|text=|trigger=button}{sub-section}{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_see|text=|trigger=button}{sub-section}{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_sam|text=|trigger=button}{sub-section}{sub-section:16410C43861FCAF0-AFCA376B-407A45F0-84149663-B9548F14CFC32EFCFCB01F95_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.primaryDataSource = 'db:/user_data/another_parent_table';
relation.foreignDataSource = 'db:/user_data/another_child_table';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72}{tr:id=name}{td}h6.foreignServerName{td}{tr}{tr:id=des}{td}{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_des|text=|trigger=button}{sub-section}{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_des|trigger=none|class=sIndent}The name of the server where the foreign table is located.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_ret|text=|trigger=button}{sub-section}{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_see|text=|trigger=button}{sub-section}{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_see|text=|trigger=button}{sub-section}{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_sam|text=|trigger=button}{sub-section}{sub-section:D92B339D64A913B0-E6FA9FFC-4F354137-B40BA37B-FFE13E8F3F864ACBC6E42B72_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.primaryTableName = 'another_parent_table';
relation.primaryServerName = 'user_data';
relation.foreignTableName = 'another_child_table';
relation.foreignServerName = 'user_data';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4}{tr:id=name}{td}h6.foreignTableName{td}{tr}{tr:id=des}{td}{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_des|text=|trigger=button}{sub-section}{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_des|trigger=none|class=sIndent}The name of the foreign table.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_ret|text=|trigger=button}{sub-section}{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_see|text=|trigger=button}{sub-section}{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_see|text=|trigger=button}{sub-section}{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_sam|text=|trigger=button}{sub-section}{sub-section:1ACBB6ED69CE960F-4AFD1A53-45F74B01-A537AF3B-2537C84138BECA095021CBA4_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.primaryTableName = 'another_parent_table';
relation.primaryServerName = 'user_data';
relation.foreignTableName = 'another_child_table';
relation.foreignServerName = 'user_data';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34}{tr:id=name}{td}h6.initialSort{td}{tr}{tr:id=des}{td}{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_des|text=|trigger=button}{sub-section}{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_des|trigger=none|class=sIndent}A String which specified a set of sort options for the initial sorting of data
retrieved through this relation.

Has the form "column_name asc, another_column_name desc, ...".{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_ret|text=|trigger=button}{sub-section}{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_see|text=|trigger=button}{sub-section}{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_see|text=|trigger=button}{sub-section}{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_sam|text=|trigger=button}{sub-section}{sub-section:90E7B524B08D5854-D894673B-415D4296-9B0AB01F-95D3CB17D834F018BBC40A34_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.initialSort = 'another_child_table_text asc';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757}{tr:id=name}{td}h6.joinType{td}{tr}{tr:id=des}{td}{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_des|text=|trigger=button}{sub-section}{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_des|trigger=none|class=sIndent}The join type that is performed between the primary table and the foreign table.
Can be "inner join" or "left outer join".{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_ret|text=|trigger=button}{sub-section}{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_see|text=|trigger=button}{sub-section}{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_see|text=|trigger=button}{sub-section}{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_sam|text=|trigger=button}{sub-section}{sub-section:44223C27A1FE04DE-C555C1BD-46CE4BB5-BB008CD2-E06F4D04B56BC71CED1D6757_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.joinType = JSRelation.LEFT_OUTER_JOIN;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC}{tr:id=name}{td}h6.name{td}{tr}{tr:id=des}{td}{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_des|text=|trigger=button}{sub-section}{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_des|trigger=none|class=sIndent}The name of the relation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_ret|text=|trigger=button}{sub-section}{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_see|text=|trigger=button}{sub-section}{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_see|text=|trigger=button}{sub-section}{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_sam|text=|trigger=button}{sub-section}{sub-section:A2985AD0DA969405-4389D188-4F2642E8-913B80C8-47F6C6A240A1AE3D6A84C7DC_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.name = 'anotherName';
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.relationName = relation.name;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F}{tr:id=name}{td}h6.primaryDataSource{td}{tr}{tr:id=des}{td}{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_des|text=|trigger=button}{sub-section}{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_des|trigger=none|class=sIndent}Qualified name of the primary data source. Contains both the name of the primary server
and the name of the primary table.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_ret|text=|trigger=button}{sub-section}{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_see|text=|trigger=button}{sub-section}{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_see|text=|trigger=button}{sub-section}{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_sam|text=|trigger=button}{sub-section}{sub-section:0FF9CC32EEDDF00E-8E839DC1-413841CC-B6A596E1-D9EA692909871D70BA485F6F_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.primaryDataSource = 'db:/user_data/another_parent_table';
relation.foreignDataSource = 'db:/user_data/another_child_table';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A}{tr:id=name}{td}h6.primaryServerName{td}{tr}{tr:id=des}{td}{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_des|text=|trigger=button}{sub-section}{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_des|trigger=none|class=sIndent}The name of the server where the primary table is located.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_ret|text=|trigger=button}{sub-section}{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_see|text=|trigger=button}{sub-section}{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_see|text=|trigger=button}{sub-section}{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_sam|text=|trigger=button}{sub-section}{sub-section:E48D2124613B43E1-C8AA4F8E-47A14712-B2FFB05E-F147856FD78EAE8FD509687A_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.primaryTableName = 'another_parent_table';
relation.primaryServerName = 'user_data';
relation.foreignTableName = 'another_child_table';
relation.foreignServerName = 'user_data';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4}{tr:id=name}{td}h6.primaryTableName{td}{tr}{tr:id=des}{td}{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_des|text=|trigger=button}{sub-section}{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_des|trigger=none|class=sIndent}The name of the primary table.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_ret|text=|trigger=button}{sub-section}{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_see|text=|trigger=button}{sub-section}{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_see|text=|trigger=button}{sub-section}{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_sam|text=|trigger=button}{sub-section}{sub-section:7956ACDEBAA99A23-6C4423B5-42414F07-BE8BB2F4-2B8918C4E0E8C243E58506F4_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.primaryTableName = 'another_parent_table';
relation.primaryServerName = 'user_data';
relation.foreignTableName = 'another_child_table';
relation.foreignServerName = 'user_data';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44}{tr:id=name}{td}h6.getRelationItems{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelationItem]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getRelationItems{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_des|text=|trigger=button}{sub-section}{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_des|trigger=none|class=sIndent}Returns an array of JSRelationItem objects representing the relation criteria defined for this relation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_ret|text=|trigger=button}{sub-section}{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_ret|trigger=none|class=sIndent}[JSRelationItem]\[] -- An array of JSRelationItem instances representing the relation criteria of this relation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_see|text=|trigger=button}{sub-section}{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_see|text=|trigger=button}{sub-section}{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_sam|text=|trigger=button}{sub-section}{sub-section:04E07B95950D4039-8F32A6B7-4415491D-BCE68791-D0815290AAD59757412C6A44_sam|class=sIndent|trigger=none}{code:language=javascript}
var criteria = relation.getRelationItems();
for (var i=0; i<criteria.length; i++)
{
	var item = criteria[i];
	application.output('relation item no. ' + i);
	application.output('primary column: ' + item.primaryDataProviderID);
	application.output('operator: ' + item.operator);
	application.output('foreign column: ' + item.foreignColumnName);
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08}{tr:id=name}{td}h6.newRelationItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelationItem]{span}{span:id=iets|style=float: left; font-weight: bold;}newRelationItem{span}{span:id=iets|style=float: left;}\(dataprovider, operator, foreinColumnName){span}{td}{tr}{tr:id=des}{td}{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_des|text=|trigger=button}{sub-section}{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_des|trigger=none|class=sIndent}Creates a new relation item for this relation. The primary dataprovider, the foreign data provider 
and one relation operators (like '=' '!=' '>' '<') must be provided.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_prs|trigger=none}dataprovider -- The name of the primary dataprovider.
operator -- The operator used to relate the primary and the foreign dataproviders.
foreinColumnName -- The name of the foreign dataprovider.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_ret|text=|trigger=button}{sub-section}{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_ret|trigger=none|class=sIndent}[JSRelationItem] -- A JSRelationItem instance representing the newly added relation item.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_see|text=|trigger=button}{sub-section}{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_see|text=|trigger=button}{sub-section}{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_sam|text=|trigger=button}{sub-section}{sub-section:42738F63BE0B6D5E-F1619EB1-4F214FE2-BDE48A5A-6EED0E3295775A63E6F4AA08_sam|class=sIndent|trigger=none}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.newRelationItem('another_parent_table_id', '=', 'another_child_table_parent_id');
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}