Hi @Anonymous ,
As much as I wonder why Lookup fields are used at all (I have never found the need and they can cause you unwanted and unnecessary grief), there are two issues here
If(
IsBlank(
LookUp(
'In-Depth Review',
CRUCaseID.Id = Value(BrowseGallery1.Selected.ID)
)
),
Patch(
'In-Depth Review',
Defaults('In-Depth Review'),
{
CRUCaseID:
{
Id:BrowseGallery1.Selected.ID,
Value: BrowseGallery1.Selected.YourFieldName
}
}
)
);
This line
CRUCaseID.Id = Value(BrowseGallery1.Selected.ID)
is not Delegable (it is a Relational query and SharePoint is not a Relational database) and therefore you will have issues on larger data sets and this part
Value: BrowseGallery1.Selected.ID
as per my main code above needs to be the field name (not the ID) being looked up in the list contained in the gallery.
You can solve the Delegation issue with
If(
IsBlank(
LookUp(
'In-Depth Review',
CRUCaseID.Value = BrowseGallery1.Selected.YourFieldName
)
),
Patch(
'In-Depth Review',
Defaults('In-Depth Review'),
{
CRUCaseID:
{
Id:BrowseGallery1.Selected.ID,
Value: BrowseGallery1.Selected.YourFieldName
}
}
)
);
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps