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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,228)