You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/developer/component-framework/reference/utility/lookupobjects.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,13 @@ title: lookupObjects (Power Apps component framework API reference) | Microsoft
3
3
description: Opens a lookup dialog allowing the user to select one or more items.
4
4
ms.author: hemantg
5
5
author: HemantGaur
6
-
ms.date: 05/27/2022
6
+
ms.date: 03/01/2024
7
7
ms.reviewer: jdaly
8
8
ms.topic: reference
9
9
ms.subservice: pcf
10
10
contributors:
11
11
- JimDaly
12
+
- rarattay
12
13
---
13
14
14
15
# lookupObjects
@@ -27,12 +28,31 @@ Model-driven apps
27
28
28
29
| Parameter Name|Type|Required|Description|
29
30
| ------------- |----|--------|-----------|
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)|
31
32
32
33
## Return Value
33
34
34
35
Type: Promise<LookupValue[]>
35
36
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.
Copy file name to clipboardExpand all lines: powerapps-docs/developer/data-platform/fetchxml/join-tables.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Join tables using FetchXml
3
3
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
5
5
ms.reviewer: jdaly
6
6
ms.topic: how-to
7
7
author: pnghub
@@ -69,7 +69,7 @@ The results look like this:
69
69
70
70
## Limitations
71
71
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:
73
73
74
74
> Code: `0x8004430D`
75
75
> Number: `-2147204339`
@@ -99,9 +99,9 @@ The previous example is a many-to-one relationship where many account records ca
99
99
100
100
### Retrieve relationship information
101
101
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.
103
103
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:
105
105
106
106
-[Browse table definitions in your environment](../browse-your-metadata.md)
@@ -135,7 +135,7 @@ The following table shows the [link-entity](reference/link-entity.md) attribute
135
135
|`from`|`primarycontactid`|The name of the lookup column in the *referencing* account table|
136
136
|`to`|`contactid`|The primary key of the *referenced* contact table|
137
137
|`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`|
139
139
140
140
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`.
141
141
@@ -157,7 +157,7 @@ The results include the same records and data as the previous query using the ma
157
157
158
158
## Many-to-many relationships
159
159
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.
161
161
162
162
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`.
163
163
@@ -202,7 +202,7 @@ The results should look something like:
202
202
203
203
## No relationship
204
204
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.
206
206
207
207
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.
208
208
@@ -224,14 +224,14 @@ For example, this query finds pairs of records where the [Name column](../refere
224
224
> [!NOTE]
225
225
> 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.
226
226
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:
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:
235
235
236
236
- Columns of the **Multiple Lines of Text** type
237
237
- 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
243
243
244
244
## Find records not in a set
245
245
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.
247
247
248
248
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).
249
249
@@ -271,7 +271,7 @@ For example, the following query returns all account records with no contacts.
271
271
272
272
## Use advanced link types
273
273
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.
275
275
276
276
|Name|Description|
277
277
|---------|---------|
@@ -281,7 +281,7 @@ The following link entity types do not directly correspond to T-SQL [JOIN operat
281
281
282
282
### Use `exists` or `in` link types
283
283
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.
285
285
286
286
#### `exists`
287
287
@@ -360,9 +360,9 @@ where "contact0".contactid in (
360
360
361
361
---
362
362
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.
364
364
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.
366
366
367
367
### Use `matchfirstrowusingcrossapply` link type
368
368
@@ -406,9 +406,7 @@ cross apply (
406
406
407
407
---
408
408
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.
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