cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rama96x
Resolver I
Resolver I

Filter and LookUp gives me a runtime error

Hello all experts!

 

I have two different Tables in dataverse respectively called Document and Site Members

These two tables have a relationship with a LookUp type called SiteID (SiteID stems from another table called Site).

So, Document table has a column called SiteID and Site Member table has a column called SiteID. 

- Document table have all the relevant document's that I wanna visualize in a Gallery,

- Site Member table have information of the logged in user such as email address

- Site table have a SiteID that have a relationship with both Documents and Site Members

 

What I'm trying to accomplish is to filter a Gallery based on your SiteID and show all records in Document that have the same SiteID as the Site Member.

 

In plain English, look into the current logged in users SiteID and  find me all the documents from the table Documents that have the same SiteID.

 

What I have done until now is to create a LookUp where I'm basically trying to identify the user (this is on App = OnStart property):

 

 

Set(
    varStoreSiteID,
    LookUp(
        'Site Members',
        'User Mail' = profileMail,
        SiteID.'Location Name'
    )
);

 

after this, I have created a Filter on a Gallery:

 

Filter(Documents,
    varStoreSiteID = SiteID.'Location Name'
)

 

 

This throws me a runtime error with: The left side of the 'Equal' operator must be a property of the entity.

 

Can anyone tell me what I'm doing wrong or even better, is there a better solution than what I have done in my Table structure? 

 

Please note, profileMail is a global variable of the users Email address

1 ACCEPTED SOLUTION

Accepted Solutions
Rama96x
Resolver I
Resolver I

I don't have any explanation of why, but it suddenly stopped giving me any runtime errors, so now it works....

View solution in original post

3 REPLIES 3
timl
Super User
Super User

@Rama96x 

If you reverse the conditional part of your call to Filter so that it looks like this, does that make a difference?

Filter(Documents,
       SiteID.'Location Name' = varStoreSiteID
)

 

@timl I did try that based on an other post, but that didn't help unfortunately 

Rama96x
Resolver I
Resolver I

I don't have any explanation of why, but it suddenly stopped giving me any runtime errors, so now it works....

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,185)