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=404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422}{tr:id=name}{td}h6.INNER_JOIN{td}{tr}{tr:id=des}{td}{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_des|text=|trigger=button}{sub-section}{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_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:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_ret|text=|trigger=button}{sub-section}{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_see|text=|trigger=button}{sub-section}{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_see|text=|trigger=button}{sub-section}{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_sam|text=|trigger=button}{sub-section}{sub-section:404185AD0D42D06E-87C72BBD-4C9F4707-A3AA9FF4-3258C9DFB45521F4D4FC0422_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=2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8}{tr:id=name}{td}h6.LEFT_OUTER_JOIN{td}{tr}{tr:id=des}{td}{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_des|text=|trigger=button}{sub-section}{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_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:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_ret|text=|trigger=button}{sub-section}{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_see|text=|trigger=button}{sub-section}{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_see|text=|trigger=button}{sub-section}{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_sam|text=|trigger=button}{sub-section}{sub-section:2CB03D5F79C77592-7535C237-44D74E1B-95EBA502-2528C554A30FA17A36CB50E8_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=12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D}{tr:id=name}{td}h6.allowCreationRelatedRecords{td}{tr}{tr:id=des}{td}{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_des|text=|trigger=button}{sub-section}{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_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:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_ret|text=|trigger=button}{sub-section}{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_see|text=|trigger=button}{sub-section}{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_see|text=|trigger=button}{sub-section}{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_sam|text=|trigger=button}{sub-section}{sub-section:12707FEBFD81E5EC-511C2453-4527410E-A5F68375-788D14DF159033EEB094241D_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=458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B}{tr:id=name}{td}h6.allowParentDeleteWhenHavingRelatedRecords{td}{tr}{tr:id=des}{td}{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_des|text=|trigger=button}{sub-section}{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_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:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_ret|text=|trigger=button}{sub-section}{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_see|text=|trigger=button}{sub-section}{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_see|text=|trigger=button}{sub-section}{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_sam|text=|trigger=button}{sub-section}{sub-section:458E6329EB7E95B3-E5C9DF6B-472B49A0-9EE585CB-D703AB40BE4BA82A9FC4299B_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=94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D}{tr:id=name}{td}h6.deleteRelatedRecords{td}{tr}{tr:id=des}{td}{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_des|text=|trigger=button}{sub-section}{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_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:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_ret|text=|trigger=button}{sub-section}{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_see|text=|trigger=button}{sub-section}{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_see|text=|trigger=button}{sub-section}{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_sam|text=|trigger=button}{sub-section}{sub-section:94290BDD99534B26-9E230EDF-44CF4F28-84129761-0D880F4D4048747DFDBD2C1D_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=CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68}{tr:id=name}{td}h6.foreignDataSource{td}{tr}{tr:id=des}{td}{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_des|text=|trigger=button}{sub-section}{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_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:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_ret|text=|trigger=button}{sub-section}{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_see|text=|trigger=button}{sub-section}{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_see|text=|trigger=button}{sub-section}{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_sam|text=|trigger=button}{sub-section}{sub-section:CF4F199F1A7B3CFC-AB5EA163-42DE4660-800485B8-11094540BE882FAE1DCD1F68_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=69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E}{tr:id=name}{td}h6.foreignServerName{td}{tr}{tr:id=des}{td}{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_des|text=|trigger=button}{sub-section}{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_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:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_ret|text=|trigger=button}{sub-section}{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_see|text=|trigger=button}{sub-section}{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_see|text=|trigger=button}{sub-section}{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_sam|text=|trigger=button}{sub-section}{sub-section:69C4D82F177DA29B-FFC45EAA-4E4240DF-A572BDB3-03DFC436105C7A2016EA3E6E_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=09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B}{tr:id=name}{td}h6.foreignTableName{td}{tr}{tr:id=des}{td}{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_des|text=|trigger=button}{sub-section}{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_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:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_ret|text=|trigger=button}{sub-section}{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_see|text=|trigger=button}{sub-section}{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_see|text=|trigger=button}{sub-section}{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_sam|text=|trigger=button}{sub-section}{sub-section:09FF1329B7386117-AD7A901E-43F64C47-952994CD-D63C6A74D84B53D340A6280B_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=ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D}{tr:id=name}{td}h6.initialSort{td}{tr}{tr:id=des}{td}{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_des|text=|trigger=button}{sub-section}{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_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:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_ret|text=|trigger=button}{sub-section}{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_see|text=|trigger=button}{sub-section}{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_see|text=|trigger=button}{sub-section}{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_sam|text=|trigger=button}{sub-section}{sub-section:ABF8C4624FB71F01-7662CD96-4B5E4081-9C33A994-A6D60EF0BAE9DB79CBF5EF8D_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=A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C}{tr:id=name}{td}h6.joinType{td}{tr}{tr:id=des}{td}{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_des|text=|trigger=button}{sub-section}{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_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:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_ret|text=|trigger=button}{sub-section}{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_see|text=|trigger=button}{sub-section}{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_see|text=|trigger=button}{sub-section}{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_sam|text=|trigger=button}{sub-section}{sub-section:A84CBC0D293A98CE-24C107F1-4E374BAF-8E63AEDD-D6ED28A89A428465EDC4D15C_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=D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9}{tr:id=name}{td}h6.name{td}{tr}{tr:id=des}{td}{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_des|text=|trigger=button}{sub-section}{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_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:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_ret|text=|trigger=button}{sub-section}{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_see|text=|trigger=button}{sub-section}{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_see|text=|trigger=button}{sub-section}{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_sam|text=|trigger=button}{sub-section}{sub-section:D9B08177377AD346-67CFE039-49C048C6-BFA19D8C-A7768086EFD042F55F12BBA9_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=14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69}{tr:id=name}{td}h6.primaryDataSource{td}{tr}{tr:id=des}{td}{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_des|text=|trigger=button}{sub-section}{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_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:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_ret|text=|trigger=button}{sub-section}{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_see|text=|trigger=button}{sub-section}{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_see|text=|trigger=button}{sub-section}{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_sam|text=|trigger=button}{sub-section}{sub-section:14AA03FDC478E7DD-A8E9751C-45054721-93A8BA25-FBC7BDA979ED99410DB90C69_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=2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42}{tr:id=name}{td}h6.primaryServerName{td}{tr}{tr:id=des}{td}{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_des|text=|trigger=button}{sub-section}{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_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:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_ret|text=|trigger=button}{sub-section}{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_see|text=|trigger=button}{sub-section}{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_see|text=|trigger=button}{sub-section}{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_sam|text=|trigger=button}{sub-section}{sub-section:2303AC7B15E07BF1-D3462049-420F4FB4-AC8DB265-B1A67CA3EB0FCC73F3BA6D42_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=56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E}{tr:id=name}{td}h6.primaryTableName{td}{tr}{tr:id=des}{td}{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_des|text=|trigger=button}{sub-section}{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_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:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_ret|text=|trigger=button}{sub-section}{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_see|text=|trigger=button}{sub-section}{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_see|text=|trigger=button}{sub-section}{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_sam|text=|trigger=button}{sub-section}{sub-section:56410CA99B6D3DAC-B4A927E9-47FE4FF1-B605AC45-795F449D6FA0D9FC5D78200E_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=D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA}{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:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_des|text=|trigger=button}{sub-section}{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_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:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_ret|text=|trigger=button}{sub-section}{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_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:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_see|text=|trigger=button}{sub-section}{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_see|text=|trigger=button}{sub-section}{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_sam|text=|trigger=button}{sub-section}{sub-section:D712020AAC61E657-EC2DDE7B-420041B7-98419A8F-EFF2E7F1C3858AE77FE6F0DA_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=113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE}{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:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_des|text=|trigger=button}{sub-section}{sub-section:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_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:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_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:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_ret|text=|trigger=button}{sub-section}{sub-section:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_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:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_see|text=|trigger=button}{sub-section}{sub-section:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_see|text=|trigger=button}{sub-section}{sub-section:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_sam|text=|trigger=button}{sub-section}{sub-section:113DD8F750560073-BDF13409-418F4C1C-880D8C48-E9829D6A4C7C690EA34638BE_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}