Skip to content

Commit 5044e8d

Browse files
committed
Pull from main
2 parents a7dc8c8 + b6a59dc commit 5044e8d

File tree

19 files changed

+192
-93
lines changed

19 files changed

+192
-93
lines changed

powerapps-docs/developer/component-framework/reference/utility/lookupobjects.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ title: lookupObjects (Power Apps component framework API reference) | Microsoft
33
description: Opens a lookup dialog allowing the user to select one or more items.
44
ms.author: hemantg
55
author: HemantGaur
6-
ms.date: 05/27/2022
6+
ms.date: 03/01/2024
77
ms.reviewer: jdaly
88
ms.topic: reference
99
ms.subservice: pcf
1010
contributors:
1111
- JimDaly
12+
- rarattay
1213
---
1314

1415
# lookupObjects
@@ -27,12 +28,31 @@ Model-driven apps
2728

2829
| Parameter Name|Type|Required|Description|
2930
| ------------- |----|--------|-----------|
30-
|lookupOptions|`UtilityApi.LookupOptions`|Yes|Defines the options for opening the lookup dialog. For a list of lookupOptions, see [lookupOptions](../../../model-driven-apps/clientapi/reference/Xrm-Utility/lookupObjects.md) |
31+
|lookupOptions|`UtilityApi.LookupOptions`|Yes|Defines the options for opening the lookup dialog. See [Remarks](#remarks) |
3132

3233
## Return Value
3334

3435
Type: Promise<LookupValue[]>
3536

37+
## Remarks
38+
39+
The lookupOptions available for components is different from those for the [Client API Xrm.Utility.lookupObjects lookupOptions properties](../../../model-driven-apps/clientapi/reference/Xrm-Utility/lookupObjects.md#lookupoptions-properties) available for model-driven app client side scripts.
40+
41+
### lookupOptions properties
42+
43+
For components, lookupOptions parameter has the following properties:
44+
45+
|Property Name |Type |Required |Description |
46+
|---|---|---|---|
47+
|`allowMultiSelect`|Boolean|No|Indicates whether the lookup allows more than one item to be selected.|
48+
|`defaultEntityType`|String|No|The default table type to use.|
49+
|`defaultViewId`|String|No|The default view to use.|
50+
|`entityTypes`|Array|Yes|The table types to display.|
51+
|`searchText`|String|No|Indicates the default search term for the lookup control. This is supported only on [Unified Interface](/power-platform/admin/about-unified-interface).|
52+
|`viewIds`|Array|No|The views to be available in the view picker. Only system views are supported.|
53+
54+
The `disableMru` and `filters` properties available for model-driven app client scripts are not available for components.
55+
3656

3757
### Related articles
3858

powerapps-docs/developer/data-platform/fetchxml/join-tables.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Join tables using FetchXml
33
description: Learn how to use FetchXml to join tables when you retrieve data from Microsoft Dataverse.
4-
ms.date: 02/29/2024
4+
ms.date: 03/08/2024
55
ms.reviewer: jdaly
66
ms.topic: how-to
77
author: pnghub
@@ -69,7 +69,7 @@ The results look like this:
6969

7070
## Limitations
7171

72-
You can add up to 15 `link-entity` elements to a query. Each link-entity adds a JOIN to the query and increases the time to execute the query. This limit is to protect performance. If you add more than 15 link-entity elements to a query you will get this error:
72+
You can add up to 15 `link-entity` elements to a query. Each link-entity adds a JOIN to the query and increases the time to execute the query. This limit is to protect performance. If you add more than 15 link-entity elements to a query, you get this error:
7373

7474
> Code: `0x8004430D`
7575
> Number: `-2147204339`
@@ -99,9 +99,9 @@ The previous example is a many-to-one relationship where many account records ca
9999

100100
### Retrieve relationship information
101101

102-
If you use the [XrmToolbox](../community-tools.md#xrmtoolbox) [FetchXmlBuilder](https://fetchxmlbuilder.com/), you can see how this tool allows you to select the relationship to set the appropriate `name`, `from`, and `to` attribute values.
102+
If you use the [XrmToolBox](../community-tools.md#xrmtoolbox) [FetchXML Builder](https://fetchxmlbuilder.com/), you can see how this tool allows you to select the relationship to set the appropriate `name`, `from`, and `to` attribute values.
103103

104-
You can also use other tools and APIs to look up relationship data for the appropriate `name`, `from`, and `to` attribute values to use. For more information see:
104+
You can also use other tools and APIs to look up relationship data for the appropriate `name`, `from`, and `to` attribute values to use. Learn how to retrieve this data:
105105

106106
- [Browse table definitions in your environment](../browse-your-metadata.md)
107107
- [Query schema definitions](../query-schema-definitions.md)
@@ -135,7 +135,7 @@ The following table shows the [link-entity](reference/link-entity.md) attribute
135135
|`from`|`primarycontactid`|The name of the lookup column in the *referencing* account table|
136136
|`to`|`contactid`|The primary key of the *referenced* contact table|
137137
|`alias`|`account`|A value is recommended for the `link-entity` with a one-to-many relationship. If an alias isn't provided, a default alias is generated. In this example, if no alias is provided, the data is returned with a column named `account1.name`.|
138-
|`link-type`|Not set|When no value is set, it will default to `inner`|
138+
|`link-type`|Not set|When no value is set, it defaults to `inner`|
139139

140140
The results include the same records and data as the previous query using the many-to-one relationship, except the *'parent entity'* is now `contact` instead of `account`.
141141

@@ -157,7 +157,7 @@ The results include the same records and data as the previous query using the ma
157157

158158
## Many-to-many relationships
159159

160-
Many-to-many relationships depend on an *intersect table*. An intersect table typically has just four columns, but only two of them are important. The two important columns match the primary key columns of the participating tables.
160+
Many-to-many relationships depend on an *intersect table*. An intersect table typically has just four columns, but only two of them are important. The two important columns match the primary key columns of the participating tables.
161161

162162
For example, the `TeamMembership` intersect table supports the [teammembership_association many-to-many relationship](../reference/entities/team.md#BKMK_teammembership_association) between [SystemUser](../reference/entities/systemuser.md) and [Team](../reference/entities/team.md) tables. It allows users to join multiple teams, and teams to have multiple users. `TeamMembership` has these columns: `systemuserid`, `teamid`.
163163

@@ -202,7 +202,7 @@ The results should look something like:
202202

203203
## No relationship
204204

205-
It is possible to specify `from` and `to` attributes using columns that are not part of a defined relationship.
205+
It's possible to specify `from` and `to` attributes using columns that aren't part of a defined relationship.
206206

207207
For example, this query finds pairs of records where the [Name column](../reference/entities/account.md#BKMK_Name) of an [account](../reference/entities/account.md) record matches the [FullName column](../reference/entities/contact.md#BKMK_FullName) of a [contact](../reference/entities/contact.md) record regardless of whether they reference each other in any of the lookup columns.
208208

@@ -224,14 +224,14 @@ For example, this query finds pairs of records where the [Name column](../refere
224224
> [!NOTE]
225225
> It is important that the columns specified in the `from` and `to` attributes are the same type even if they are not involved in a relationship. Using columns of different types will require a type conversion that may have performance impact and may fail for some column values.
226226
227-
The following [column types](../../../maker/data-platform/types-of-fields.md) cannot be used in `from` and `to` attributes:
227+
The following [column types](../../../maker/data-platform/types-of-fields.md) can't be used in `from` and `to` attributes:
228228

229229
- **File**
230230
- **Image**
231231
- **MultiSelect Field**
232232
- [**PartyList**](../../../maker/data-platform/types-of-fields.md#different-types-of-lookups)
233233

234-
Some columns can be used in `from` and `to` attributes but may result in poor performance:
234+
Some columns can be used in `from` and `to` attributes but might result in poor performance:
235235

236236
- Columns of the **Multiple Lines of Text** type
237237
- Columns of the **Single Line of Text** type with a maximum length larger than 850
@@ -243,7 +243,7 @@ Some columns can be used in `from` and `to` attributes but may result in poor pe
243243

244244
## Find records not in a set
245245

246-
You can use FetchXml to create a query to return records that are not in a set using a *left outer join*. A left outer join returns each row that satisfies the join of the first input with the second input. It also returns any rows from the first input that had no matching rows in the second input. The non-matching rows in the second input are returned as null values.
246+
You can use FetchXml to create a query to return records that aren't in a set using a *left outer join*. A left outer join returns each row that satisfies the join of the first input with the second input. It also returns any rows from the first input that had no matching rows in the second input. The non-matching rows in the second input are returned as null values.
247247

248248
You can perform a left outer join in FetchXML by using the `entityname` attribute in a [condition element](reference/condition.md). The `entityname` attribute is valid in conditions, filters, and nested filters. [Learn more about filters on link-entity](filter-rows.md#filters-on-link-entity).
249249

@@ -271,7 +271,7 @@ For example, the following query returns all account records with no contacts.
271271

272272
## Use advanced link types
273273

274-
The following link entity types do not directly correspond to T-SQL [JOIN operator](/sql/relational-databases/performance/joins) types and use [subqueries](/sql/relational-databases/performance/subqueries) instead. These types provides more advanced capabilities you can use to improve query performance and define more complex queries.
274+
The following link entity types don't directly correspond to T-SQL [JOIN operator](/sql/relational-databases/performance/joins) types and use [subqueries](/sql/relational-databases/performance/subqueries) instead. These types provides more advanced capabilities you can use to improve query performance and define more complex queries.
275275

276276
|Name|Description|
277277
|---------|---------|
@@ -281,7 +281,7 @@ The following link entity types do not directly correspond to T-SQL [JOIN operat
281281

282282
### Use `exists` or `in` link types
283283

284-
`exists` and `in` are variants of `inner` that use different conditions ([EXISTS](/sql/t-sql/language-elements/exists-transact-sql) and [IN](/sql/t-sql/language-elements/in-transact-sql) respectively) in the `where` clause so that multiple copies of the parent row aren't returned in the results. Neither of these return the column values of the link entity rows.
284+
`exists` and `in` are variants of `inner` that use different conditions ([EXISTS](/sql/t-sql/language-elements/exists-transact-sql) and [IN](/sql/t-sql/language-elements/in-transact-sql) respectively) in the `where` clause so that multiple copies of the parent row aren't returned in the results. Neither of these types return the column values of the link entity rows.
285285

286286
#### `exists`
287287

@@ -360,9 +360,9 @@ where "contact0".contactid in (
360360

361361
---
362362

363-
Using `exists` or `in` link types can reduce the size of intermediate or final query results, especially when many matching linked rows exist for the same parent rows, or when multiple link entities are used with the same parent Using `exists` or `in` link types can can improve performance of the query compared to the `inner` type because it doesn't require returning a Cartesian product containing all possible permutations of rows from different linked entities for each parent row.
363+
Using `exists` or `in` link types can reduce the size of intermediate or final query results, especially when many matching linked rows exist for the same parent rows, or when multiple link entities are used with the same parent Using `exists` or `in` link types can improve performance of the query compared to the `inner` type because it doesn't require returning a Cartesian product containing all possible permutations of rows from different linked entities for each parent row.
364364

365-
These link types may also allow Dataverse to only find the first matching linked entity row for each parent row which is more efficient than finding all matching rows in the linked entity in an `inner` join.
365+
These link types might also allow Dataverse to only find the first matching linked entity row for each parent row, which is more efficient than finding all matching rows in the linked entity in an `inner` join.
366366

367367
### Use `matchfirstrowusingcrossapply` link type
368368

@@ -406,9 +406,7 @@ cross apply (
406406

407407
---
408408

409-
This is equivalent to the `outer` type except it only returns the parent row at most once. Unlike `in` and `exists` types, it **does** return column values from one of the matching rows in the linked entity when matching rows exist, but the parent row is returned even if there are no matching rows in the linked entity. Use this when only a single example of a matching row from the linked entity is sufficient and multiple copies of the parent row in the results are not necessary.
410-
411-
409+
The `matchfirstrowusingcrossapply` link type is equivalent to the `inner` type except it only returns the parent row at most once. The parent row is returned only if there are matching rows in the linked entity but, unlike `in` and `exists` types, it **does** return column values from one of the matching rows in the linked entity. Use this when only a single example of a matching row from the linked entity is sufficient and multiple copies of the parent row in the results aren't necessary.
412410

413411

414412
## Next steps
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
A variant of `outer` that can provide performance benefits. Use this when only a single example of a matching row from the linked entity is sufficient and multiple copies of the parent row in the results are not necessary. [Learn more about matchfirstrowusingcrossapply](../../join-tables.md#use-matchfirstrowusingcrossapply-link-type)
1+
A variant of `inner` that can provide performance benefits. Use this type when only a single example of a matching row from the linked entity is sufficient and multiple copies of the parent row in the results aren't necessary. [Learn more about matchfirstrowusingcrossapply](../../join-tables.md#use-matchfirstrowusingcrossapply-link-type)

0 commit comments

Comments
 (0)