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 / How to show data in Ga...
Power Apps
Answered

How to show data in Gallery from Sharepoint list in Edit/New Mode

(1) ShareShare
ReportReport
Posted on by 166
Hello All,
 
I have a gallery which has only 1 field in form of CheckBoxes. IN new Mode I am able to show all my choices and save the data to SharePoint List. But when user wants to go back and edit the same SharePoint List I am unable pull the data and load into the Gallery.
 
New Mode Edit Mode
Code
Gallery Items:  Choices([@Waivers].'Select Waiver Reasons'
Checkbox.Text : ThisItem.Value
I tried multiple code sets but nothing seems to be working and not loading saved data from share point
 
If(
    IsBlank(SharePointIntegration.Selected.ID),
    Choices([@Waivers].'Select Waiver Reasons (one or many)'),
    Filter([@Waivers],ID = SharePointIntegration.Selected.ID)
   
)
With above code I now am getting only IsSelected option in checkbox
Checkbox.Text : ThisItem.IsSelected
 
   
 
 
Here is the field defined in Sharepoint list
 
 
 
 
 
I have the same question (0)
  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at
    Firstly there is a lot more setup on this function than you have posted. You might first watch this video to see if your process is complete.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • PraveenC Profile Picture
    166 on at
    Hello @WarrenBelz,
     
    I am using patch function to save the data and using choices to load the data for this column, unlike reza using datacard.
     
    In default and update events i cant populate the same code he suggested.
     
    And on Visible event, I have used below code with no luck. Kindly suggest, I am stuck on this for over a week now.
     
     
    No value is getting populated which is already saved in SP
     
  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at
    I am more than a little confused what you are doing here. Firstly you cannot mix an action (Clear) and a query (Filter) in the one piece of code. OnVisible is a trigger so the action is valid (Clear). For a Filter, it needs to be on the Items of a Table control such as a Gallery or a drop-down. Also filtering a SharePoint list on the ID will return only one record, so you can use LookUp here, however to confuse matters further, you have not included the Patch code to refer to. I can see you are using checkboxes, but how you generate and save them is not evident.
  • PraveenC Profile Picture
    166 on at
    Hello WarrenBelz,
     
    Lookup worked, but now its only showing what was saved.
     
     
    I was hoping to see something like this, so users if need be, can make further changes and save the form
     
     
    Here is the code written on Items
     
  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at
    Hi PraveenC ,
    It is doing exactly what you are asking it to do - showing the values that are saved in the 'Select Waiver Reasons (one or many)' (I assume) multi-value choice field.
    Also SharePointIntegration.SelectedListItemID is never going to be blank unless you create a new record without refreshing the browser immediately before creating it or creating as the first in the user's session (the Variable persists unless one of these two things occur).
    What you are doing is rather unusual - if you have this as the Items of the gallery and use a Classic Checkbox (I recommend this)
    Choices([@Waivers].'Select Waiver Reasons (one or many)')
    then the Default of the checkbox
    Self.Text in LookUp(
       Waivers,
       ID = SharePointlntegration.SelectedListItemID,
       'Select Waiver Reasons (one or many)'
    )
    it should display the fields chosen in the checkboxes. You are also going to have a challenge updating the field from this - this should work in the Data Card Update
    ForAll(
       Filter(
          GalleryName.AllItems,
          CheckboxName.Value
       ) As _Items,
       {Value: _Items.Value}
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • PraveenC Profile Picture
    166 on at
    Hello WarrenBelz,
     
    Truly appreciate you taking time and helping me out. Means a lot to me in my situation.
     
    Here are the changes I made
     
    Items:
    Choices([@Waivers].'Select Waiver Reasons (one or many)')
    CheckBox.Default:
    CheckBox. Text:
     
    Now when I open the page in edit mode, I can see all the rows, but nothing selected.
     
     
  • Verified answer
    WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at
    Works here on a model I created - not sure what else to offer. To be honest I would be using a multi-select Combo Box - that is what Power Apps was designed to do with multi-value columns - galleries inside data cards are a workaround and were never really intended and your process is further complicating issues with the way you have done it.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard