cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

'...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
Super User

@Anonymous 

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

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

No record found with the new language.

3csman_0-1613334061924.png

 

3csman_1-1613334139013.png

 

 

Anonymous
Not applicable

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

 



Anonymous
Not applicable

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
Super User

@Anonymous 

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

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

@Anonymous 

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

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

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

RandyHayes
Super User
Super User

@Anonymous 

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

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

 

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

3csman_0-1613346609183.png

 

Library:

3csman_1-1613346736605.png

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,892)