cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LyndonL
Regular Visitor

SharePoint List Attachments Behaviour

Hi folks,

 

I have an app that displays a gallery from a SP List, and a sub-gallery that displays each list item's attachments via icons.

Everything was working for me yesterday, however today I noticed that the attachment icons in the sub-gallery weren't displaying. No edits had been made in the time between.

 

From troubleshooting, the parent gallery is showing IsBlank(First(ThisItem.Attachments)) as true. Same for IsBlankOrError. IsError is showing false. Upon viewing the values within the Table, the {Attachments} field is now showing "This data type is unsupported for evaluation", and the {FilenameWithExtension} field is now showing the first attachments details.

 

It seems as though PowerApps is now assuming all List attachments are singular? Can anybody offer any guidance please?

 

EDIT: I have tried changing the Authoring Version to all options within the list, without change to the functionality. I tried from 3.22094.26 to 3.22104.8.

 

Thanks,

Lyndon

1 ACCEPTED SOLUTION

Accepted Solutions
LyndonL
Regular Visitor

For anyone else suffering the same issue, I managed my workaround by moving the If statement to the middle of the Items code:

 

// Pagination of Source gallery
LastN(
    FirstN(
        scrContIndivGalDocsSource.AllItems,
        Pagination * docPageNum
    ),
    // Check if it's the last page or not
    If (scrContIndivGalDocsIcnRight.DisplayMode = DisplayMode.Disabled, 
        Pagination - (Pagination * docPageNum - CountRows(scrContIndivGalDocsSource.AllItems)), 
        Pagination
    )
)

 

It's slightly less clear than previous, and leaves less room for customisation, however it works. If support come back with any answers as to why the If statement stopped it from working I'll post back.

 

EDIT: 

Support assisted me and it turns out it was an issue with the in service platform authoring version. 

 

Whenever there was a nested gallery and using and If condition in the Parent gallery, ThisItem.Attachments couldn’t be found in the child gallery. Therefore, even use countRows was returning 0 results. However, the latest authoring version has fixed allowing an If condition in the parent gallery.

 

Another workaround suggested was to use LookUp:

LookUp(Gallery1.AllItems, ID=ThisItem.ID).Attachments

However this is no longer required.

View solution in original post

6 REPLIES 6

Is it similar to this issue?

Attachment picture in a gallery failed to open since one week 

 


@LyndonL wrote:

EDIT: I have tried changing the Authoring Version to all options within the list, without change to the functionality. I tried from 3.22094.26 to 3.22104.8.


If it is not possible to temporarily resolve the issue by changing the current authoring version to another one, then all the current available authoring versions that can be temporarily switched to, may currently be affected by the issue you are describing.

I suspect this may be the case at the moment.

In that event, the only thing left is to Create a new Power Platform Support Ticket . This should be done even if reverting works by the way, because that reverting functionality is intended only as a temporary troubleshooting measure.

 

See if it helps @LyndonL 

Thanks for the quick response. That linked question was what prompted me to change the authoring versions.

 

Unfortunately I am not an administrator so cannot log a support ticket, however I will get in touch with my administrator and ask them to on my behalf. It would be great if non-admins could log issues, however I can understand why gatekeeping might be useful. 

 

I was more wondering if there were any functionality changes that I may have missed. It sounds as though that simple solution may not be the case though.

@LyndonL 

 

I am not aware of such a change, I think you should contact your admin to perform the steps to create a support ticket so the appropriate team can check on it in more detail and advise you further. 

 

You can try and make changes so the app accepts it for now (and I suspect it may not be possible to do it) but even if you found some change that seems to work, I suspect that kind of change should not actually be done or kept for the long term - so you and your admin should initiate a support ticket and see if you could be advised further and in more detail by the appropriate team. 

Thanks @poweractivate . I'll do that, and report back here what the response is.

LyndonL
Regular Visitor

For anyone interested, I have done some more fault finding, and determined that the error lies in the pagination of the gallery. Commenting out the condition within the gallery items sorted out my issue and allowed the attachments to display:

 

// Pagination of Source gallery
/*If(
    scrContIndivGalDocsIcnRight.DisplayMode = Disabled,
    // Handling last set of records
    LastN(
        FirstN(
            scrContIndivGalDocsSource.AllItems,
            Pagination * docPageNum
        ),
        Pagination - (Pagination * docPageNum - CountRows(scrContIndivGalDocsSource.AllItems))
    ),*/
    LastN(
        FirstN(
            scrContIndivGalDocsSource.AllItems,
            Pagination * docPageNum
        ),
        Pagination
    )
//)

 

Pagination is a variable storing the number of items per page (10 in this case).

docPageNum is a variable storing the current page (initialised to 1).

scrContIndivGalDocsIcnRight is a right arrow icon, which DisplayMode is set to:

 

If(Pagination * docPageNum < CountRows(scrContIndivGalDocsSource.AllItems), DisplayMode.Edit, DisplayMode.Disabled)

 

 

I will play around a bit more and  try to determine why a condition statement has stopped working. 

In the meantime I have a ticket in with MS support.

LyndonL
Regular Visitor

For anyone else suffering the same issue, I managed my workaround by moving the If statement to the middle of the Items code:

 

// Pagination of Source gallery
LastN(
    FirstN(
        scrContIndivGalDocsSource.AllItems,
        Pagination * docPageNum
    ),
    // Check if it's the last page or not
    If (scrContIndivGalDocsIcnRight.DisplayMode = DisplayMode.Disabled, 
        Pagination - (Pagination * docPageNum - CountRows(scrContIndivGalDocsSource.AllItems)), 
        Pagination
    )
)

 

It's slightly less clear than previous, and leaves less room for customisation, however it works. If support come back with any answers as to why the If statement stopped it from working I'll post back.

 

EDIT: 

Support assisted me and it turns out it was an issue with the in service platform authoring version. 

 

Whenever there was a nested gallery and using and If condition in the Parent gallery, ThisItem.Attachments couldn’t be found in the child gallery. Therefore, even use countRows was returning 0 results. However, the latest authoring version has fixed allowing an If condition in the parent gallery.

 

Another workaround suggested was to use LookUp:

LookUp(Gallery1.AllItems, ID=ThisItem.ID).Attachments

However this is no longer required.

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