cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3csman
Impactful Individual
Impactful Individual

Multiple Component Condition

I was hoping this would work. It doesn't see to be. I have an SP library where the file format of image, work, and pdf files are as such:


New Uploads:

2021 CT0000 Ship Captain Charlie Tuna 2_14_2021

 

or 

Inherited Files: (had no date at the end)

2021 CT0000 Ship Captain Charlie Tuna

The first part has always worked. Is there a way to make both work together; if the format doesn't match the first check again against the second, type of thing? Or, can I limit the search to jus the first four fields; regardless of whether the file name has a date in it or not?

Image Control in Gallery:
First(Filter(CQImageCollection, 'Name'=ThisItem.CQYr & " " & ThisItem.UnqID & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm & " " & ThisItem.DteofCQ)).'{Link}' & First(Filter(CQImageCollection, 'Name'=ThisItem.CQYr & " " & ThisItem.UnqID & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm)).'{Link}'

1 ACCEPTED SOLUTION

Accepted Solutions
3csman
Impactful Individual
Impactful Individual

'...one man's undiscovered rock is already someone else's home.'

 

Meaning, I asked some months back whether something like this would work, and was assured that a condition like this - that looks for two different things at the same time, and only pulls and displays the image desired based on the parameters wasn't possible.

 

Well, I got a fresh start this morning, put the last condition you provided in a new image control and walla, images - old and new, everywhere.

 

Thanks for the help and the patience, Mr. Hayes!😁👍

 

With({_common: ThisItem.CQYr & " " & ThisItem.UnqID & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm}, Coalesce( LookUp(CQImageCollection, StartsWith('Title', _common & " " & ThisItem.DteofCQ)), LookUp(CQImageCollection, StartsWith('Title', _common)) ) ).'Thumbnail ({Thumbnail})'.Large

View solution in original post

22 REPLIES 22
RandyHayes
Super User III
Super User III

@3csman 

Please consider changing your Formula to the following:

With({_common: ThisItem.CQYr & " " & ThisItem.UnqID & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm & " "},
    Coalesce(
        LookUp(CQImageCollection, 'Name'= _common & ThisItem.DteofCQ, '{Link}'),
        LookUp(CQImageCollection, 'Name' = _common & ThisItem.LstNm, '{Link}')
    )
)    

 

I hope this is helpful for 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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
3csman
Impactful Individual
Impactful Individual

No record found with the new language.

3csman_0-1613334061924.png

 

3csman_1-1613334139013.png

 

 

3csman
Impactful Individual
Impactful Individual

Power Apps Error:

 

With({_common: ThisItem.CQYr &.... =  The formula uses scope, which is not presently supported for evaluation. Data Type: text

3csman_0-1613335568299.png

 



3csman
Impactful Individual
Impactful Individual

Just double checked the actual name of the file name column in the Collection (and List) is Title.

 

I updated the language to include 'Title', still no images.

 

With({_common: ThisItem.CQYr & " " & ThisItem.UnqID & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm & " "},
Coalesce(
LookUp(CQImageCollection, 'Title' = _common & ThisItem.DteofCQ, '{Link}'),
LookUp(CQImageCollection, 'Title' = _common & ThisItem.LstNm, '{Link}')
)
)

RandyHayes
Super User III
Super User III

@3csman 

I think this is the post you were referring to in the other one?

 

So, the Link property is going to be the Link property of the record.  I believe you want the image that is in the list.  How is the image stored in the item?  Is this a library or a list and if a list, what kind of 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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

@3csman 

As for the "The formula uses scope, which is not presently..." this is not an error, this is just that the formula editor cannot evaluate a value.  This is completely normal and you will see this on EVERY formula that has a ThisItem in it.

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
3csman
Impactful Individual
Impactful Individual

The image is only being uploaded to the library. No image is in the list, only the data.

RandyHayes
Super User III
Super User III

@3csman 

So you're uploading an Image to a Library as an Item.

Then your formula should be:

With({_common: ThisItem.CQYr & " " & ThisItem.UnqID & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm & " "},
    Coalesce(
        LookUp(CQImageCollection, 'Title' = _common & ThisItem.DteofCQ),
        LookUp(CQImageCollection, 'Title' = _common & ThisItem.LstNm)
    )
).Thumbnail.Large

 

Now, one trick often used in the Library is to add a Column called Thumbnail.  This then shows the Thumbnail automatically on the SharePoint list when viewed.

IF you have added a Column called Thumbnail to your Library, then change the .Thumbnail.Large in the above formula to :  .'Thumbnail ({Thumbnail})'.Large

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
3csman
Impactful Individual
Impactful Individual

 

Error: Name isn't valid. This identifier isn't recognized.

3csman_0-1613346609183.png

 

Library:

3csman_1-1613346736605.png

 

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,891)