cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lfinman
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
v-siky-msft
Community Support
Community Support

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
v-siky-msft
Community Support
Community Support

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

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,234)