cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tshomake
Helper I
Helper I

Showing an Image using lookup of sharepoint list

I am working on an internal Podcast application for my organization. I currently have created a Patch functionality that updates a SharePoint List with EmailAddress, User Name, Episode Click, and Time. To aid people using the app to remember what episode was listened to I wanted to change the visibility of icon to show based on this sharepoint list. 

 

Currently this is my code:

 

!IsBlank(LookUp('PowerApps Usage', Episode = ThisItem.Name And EmailAddress = varUserEmail))

 

What is hapening that each item in the document library is shows all false with this code. Based on my understanding and the data in my table it should only be showing true for the first episode. 

 

ThisItem.Name is the name of the episode which matches the Episode column

 

Once I add the AND to the equation it forces them all to the same value.

 

What am I missing?

1 ACCEPTED SOLUTION

Accepted Solutions

@tshomake 

So, the formulas that @yashag2255 mentioned should be doing what you need.

Specifically, !IsBlank(LookUp('PowerApps Usage', Episode = ThisItem.Name && EmailAddress = varUserEmail))

 

But one part you could change is to this formula:

    !IsBlank(LookUp('PowerApps Usage', Episode = ThisItem.Name && EmailAddress = varUserEmail, ID))

 

See if that works.  Beyond that I would make sure there is absolutely a record that matches (case and all) to what you are looking up.

 

Let's see where that gets you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

36 REPLIES 36

Hi @tshomake 

 

Can you try to update the expression to:

!IsBlank(LookUp('PowerApps Usage', Episode = ThisItem.Name && EmailAddress = varUserEmail))

OR

!IsBlank(LookUp('PowerApps Usage', AND(Episode = ThisItem.Name,EmailAddress = varUserEmail)))

OR

CountRows(Filter('PowerApps Usage', Episode = ThisItem.Name && EmailAddress = varUserEmail)) > 0

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

RandyHayes
Super User
Super User

@tshomake 

You mention this happens once you put the email equation into the formula.  If that is the case, I would suspect letter case as a possible issue.  Many times the email casing of the sharepoint list might not match the letter case of the variable you have.  I would at least double check on that to make sure you notice an exact match between your variable and your list.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

 Thanks @RandyHayes I did check this. I should have been more clear. If I put one side of the equation on either side of the AND it works for that part. As soon as I put the and it defaults all the items in the library to show the same true or false behavior.

 

I think I am missing the correct part to make sure it looks at all parts of the record in the sharepoint list. 

@yashag2255 

 

None of these codes seemed to work.

 

The First provided the same results. 

 

Second invalid for the LookUp section

 

and the Third I am not sure what the results were. I put it in a label to see what was indicated and it was blank. 

@tshomake 

So, the formulas that @yashag2255 mentioned should be doing what you need.

Specifically, !IsBlank(LookUp('PowerApps Usage', Episode = ThisItem.Name && EmailAddress = varUserEmail))

 

But one part you could change is to this formula:

    !IsBlank(LookUp('PowerApps Usage', Episode = ThisItem.Name && EmailAddress = varUserEmail, ID))

 

See if that works.  Beyond that I would make sure there is absolutely a record that matches (case and all) to what you are looking up.

 

Let's see where that gets you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@tshomake 

 

Can you try to update the expression to: 

!IsBlank(LookUp('PowerApps Usage', Episode = ThisItem.Name && EmailAddress = varUserEmail).Episode)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

@RandyHayes  Is there a way to confirm what is being pulled from my data source for the EmailAdress column. When looking at the whole list it appears to be correct. But not sure how to confirm it is correct.

 

 

 

 

 

@tshomake 

Well you should be able to just look at the column in your list...is it a Text column or a Person column?

If it is a Text column, then you will see exactly what is there to be what is being pulled.

If it is a Person column, then you actually need to change your formula.  But, you said you were able to get it to work separately just not together, so I am assuming a Text column.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I just checked and I have it set as Single Line of Text. I thought it was working however it appears to be not retrieving the specific emails in the list. Looking at the records in power apps it has chanced the EmailAddress to OData_x0070_wk2.

 

Im wondering if this is my root cause.

 

It appears to be just checking if the column under EmailAddress is blank or not. Should I move this outside the IsBlank?

 

@RandyHayes 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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