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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (52,635)