web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery failed to disp...
Power Apps
Answered

Gallery failed to display on Sharepoint Form (OnEdit mode)

(0) ShareShare
ReportReport
Posted on by 38

Hi there,

 

I'm customising a sharepoint form via power apps, and attempted to add two galleries - one as a sub-form for users to enter new update (Collection - data feed to a different sharepoint list - List A), and another one to display previous updates (records for the sharepointform ID from List A). 

 

SMW1_0-1709303198531.png

I set the items property for 'Previous Update' gallery as 

(Filter('List A', Title = SharePointForm1.LastSubmit.ID)
 
OnSuccess for the Sharepointform, I used this formula - 
ForAll(UpdateCollection, If(!IsBlank(LineItem), Patch('List A', Defaults('List A'), {'Update Item': LineItem, 'Update By': LineBy, Title: SharePointForm1.LastSubmit.ID})))
 
For the 'save' - disk icon, OnSelect is expressed as 
Patch(UpdateCollection, ThisItem, {LineItem: TextInput2.Text, LineBy: Dropdown1.Selected.Value})
 
What do I need to do to bring up the 'Previous Update' gallery when a user chooses to 'Edit' an existing Sharepoint form? Thank you.
Categories:
  • renatopc84_ch Profile Picture
    228 on at

    Hi @SMW1 

    The Form has a property.

     

    The code you need must be inserted in the Visible property of the "Previous Update" gallery

     

    If(FormName.Mode.Edit, true, false)

     

  • SMW1 Profile Picture
    38 on at

    Thank you for your advice. Perhaps I didn't make myself very clear previously. If I had to make a 'Quick Edit' to an existing form, what can I do to bring the 'Previous Updates' gallery in display (filtered to the form ID), so that I can see what are the previous updates before I insert a new update?

    SMW1_1-1709307040895.png

    Thanks.

     

    best wishes,

    SMW

     

     

  • renatopc84_ch Profile Picture
    228 on at

    Hi @SMW1 

    Sorry, so if I understood it right. The user click on a Sharepoint Item and in View Mode they see the "current" version of the item.

    Then in Edit Mode you would like to recall the previous version in this gallery.

    If I understood it right, in your Sharepoint List you have many version of the same item only with a different ID.

    Is it correct?

     

    Otherwise if you would like to work with previous version of one Sharepoint Item using the Versioning, you will need a Flow that extract the previous version with a Sharepoint HTTPS Request.

     

    Which is the correct case?

  • SMW1 Profile Picture
    38 on at

    Ok, with my limited knowledge in Power Apps, I thought each Sharepoint item will only have a unique ID (didn't consider the versioning at all!)

     

    In response to your question, 

    'The user click on a Sharepoint Item and in View Mode they see the "current" version of the item.

    Then in Edit Mode you would like to recall the previous version in this gallery.

    If I understood it right, in your Sharepoint List you have many version of the same item only with a different ID.

    Is it correct?'

     

    Yes, Sharepoint item is on the master list whereas the gallery contains items from List A, which is linked to the master list ID. My understanding is Sharepoint item on the master list will  have an automated ID unique to that item. In the Edit Mode, I'd like to recall existing items on List A linked to the unique ID of that particular Sharepoint item on the master list.

     

    Does that make any sense to you? Thanks.

  • Verified answer
    renatopc84_ch Profile Picture
    228 on at

    Hi @SMW1 

    Yes it make sense, I used the previous version with the Flow, but is still not a 100% working solution.

     

    So I find your solution with a second list that stores all updates, a good workaround.

     

    The point is that the Form has 3 modes: Edit, New, View.

     

    Basically you could let the "Previous Updates" gallery always visible and block it with a property in displaymode like Displaymode.View.

     

    So is always visible, but cannot be edited. The formula of the gallery should be correct as you already did.

  • SMW1 Profile Picture
    38 on at

    Thanks for your advice. I'll give it a go using Flow.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard