cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Lookups lost when secondary filter applied

Looking for insight on whether this is a bug or known limitation.

 

I have a canvas app, displaying information about CDS Accounts.  Data collected is filtered using a view, as in:

 

Collect(
    colAllAccounts,    
        Filter(
            Accounts,
            'Accounts (Views)'.'Customer and Partner List (Customer Account Management)'       
    )
);

 

The columns returned by the view include three lookup fields: 

Partner (an Account lookup)

Implementing Partner (an Account lookup)

Primary Contact (a Contact lookup)

 

All of the above works successfully.

 

If I add a secondary Filter on the Collect (or ClearCollect), those lookup fields all become blank.  There is no data at all in those fields, other field types (strings, option sets, etc) contain data but not Partner, Implementing Partner, Primary Contact:

 

 

Collect(
    colAllFilteredAccounts,
    Filter(
        Filter(
            Accounts,
            'Accounts (Views)'.'Customer and Partner List (Customer Account Management)'
        ),
        'Account Name' <> "Microsoft"
    )
);

 

 

Has anyone else experienced this behavior?  Any feedback on whether this is a bug or known limitation?  Took some digging for me to nail down why data suddenly disappeared from my App, but narrowed it down to this.

 

Thanks,

Lyn

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Lookups lost when secondary filter applied

Hi @lfinman ,

 

This seems to be a persistent issue that relationship can not be referenced properly when generating the collection.

The workaround is to reference the lookup related value during the creation of the collection to successfully activate the relationship, for example, add a new column to store the LookUp related value by AddColumns function.

Collect(
    colAllFilteredAccounts,
    AddColumns(
    Filter(
        Filter(
            Accounts,
            'Accounts (Views)'.'Customer and Partner List (Customer Account Management)'
        ),
        'Account Name' <> "Microsoft"
    ), "NewColumn1",Partner.Account,"NewColumn2",'Implementing Partner'.Account,"NewColumn3",'Primary Contact'.Contact)
);

Hope this helps.

Sik

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Lookups lost when secondary filter applied

Hi @lfinman ,

 

This seems to be a persistent issue that relationship can not be referenced properly when generating the collection.

The workaround is to reference the lookup related value during the creation of the collection to successfully activate the relationship, for example, add a new column to store the LookUp related value by AddColumns function.

Collect(
    colAllFilteredAccounts,
    AddColumns(
    Filter(
        Filter(
            Accounts,
            'Accounts (Views)'.'Customer and Partner List (Customer Account Management)'
        ),
        'Account Name' <> "Microsoft"
    ), "NewColumn1",Partner.Account,"NewColumn2",'Implementing Partner'.Account,"NewColumn3",'Primary Contact'.Contact)
);

Hope this helps.

Sik

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Lookups lost when secondary filter applied

Thank you Sik!  That fixed my problem.  Appreciate your response.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,584)