web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / View Filters Not Worki...
Power Apps
Suggested Answer

View Filters Not Working in PCF Control When Using Linked Entities

(1) ShareShare
ReportReport
Posted on by 200
Hi everyone,

I am working on a sample PCF dataset control where I need to retrieve data from related entities. To achieve this, I have used the PCF linked entities method, and it is working as expected.

However, I observed that when using the PCF control linked entities method—PCF automatically attaches the linked entity filters in the filters as shown in below image



Because of this, when I open the entity’s view and try to apply new filters from there (e.g., "Budget amount Equals 68000"), no records are returned or displayed.

When I downloaded the FetchXML from the view, I noticed that an extra condition is being added. Due to this condition, the records are not returned or displayed, as shown in the image



Below is the code I am using to add the linked entity and its columns
 
private async addLinkedEntity() {
    try {
        this.context.parameters.opportunityDataset.linking.addLinkedEntity({
            name: "account",
            from: "accountid",
            to: "customerid",
            linkType: "outer",
            alias: "accountdetails"
        });
    } catch (error: any) {
        console.error("Error managing linked entities:", error);
    }
}

private addLinkedEntityColumns(): void {
    let linkedEntityColumns = ["name", "primarycontactid"];
    try {
        if (this.context.parameters.opportunityDataset.addColumn) {
            let columnsAdded = false;

            linkedEntityColumns.forEach((column) => {
                let matchedIndex = this.context.parameters.opportunityDataset.columns.findIndex(
                    (item: any) => item.name === `accountdetails.${column}`
                );
                if (matchedIndex === -1) {
                    if (this.context.parameters.opportunityDataset.addColumn) {
                        this.context.parameters.opportunityDataset.addColumn(column, "accountdetails");
                        columnsAdded = true;
                    }
                }
            });

            if (columnsAdded) {
                this.context.parameters.opportunityDataset.refresh();
            }
        }
    } catch (error: any) {
        console.error("Error adding linked entity columns:", error);
    }
}


Has anyone else encountered this issue? How did you handle it? Any help is much appreciated!

Thanks!
I have the same question (0)
  • Suggested answer
    Inogic Profile Picture
    1,283 Moderator on at
    Hi,
     
    Your PCF dataset linked entity issue is caused by using an outer join with unused linked entity columns:

    1. Common Cause - Outer Join with Unused Linked Entity Columns

    When using the PCF linked entity method with linkType: "outer", it behaves like a LEFT OUTER JOIN.

    As per the definition of an outer join, it returns all records from the main table and matching records from the related table, allowing NULL values when no match exists.

    In PCF dataset scenarios, if the linked entity columns are not actively used (in rendering, filtering, or sorting), the platform may internally optimize the query by adding a condition like accountdetails.accountid IS NULL.

    This results in an unintended anti-join behavior, causing records with valid related data to be excluded and leading to empty results.

    2. Quick Fix Steps

    Please verify the following:
    • Update your PCF code → Change linkType from "outer" to "inner"
    • Ensure linked entity columns are actively used in rendering logic (e.g., record.getValue("accountdetails.name"))
    • Avoid adding linked entities without consuming their fields
    • Refresh dataset after adding columns

    Hope this resolves your issue.

    Thanks!
    Inogic

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard