cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anmdf
Level: Powered On

Creating a gallery with forms linked to Sharepoint/Excel

Hello!

 

I'm trying to build a PowerApp for this process:

1. There's a table in Sharepoint or Excel with data

2. I would show this data in Apps as gallery in table-like structure

3. Users could edit certain fields in the table in Apps

4. Users could approve line items (rows), 1 or more or all

5. Whatever the user entered in editable fields in 3/4 will update the Sharepoint/Excel table

 

I was to progress until number 2, but now I've got no idea as to how it's possible to make certain fields like an "edit form" kind of way, that updates fields in source data with anything the user inputs Smiley Sad

 

Is there any way? Appreciate any help. Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Creating a gallery with forms linked to Sharepoint/Excel

Hi @anmdf 

 

For the remaining steps, you can follow the steps:
 
1) Instead of using labels in your Gallery, use Text Inputs and set the default value property to current record value.
2) Now since you have text Inputs, you can easily allow the user to edit it.
3) You can add a bulk edit button outside the gallery, which iterates over all gallery records, and submits the details.
 
Expression: 
ForAll(Gallery1.AllItems, Patch(DataSource,Lookup(DataSource,Field1 = "Value1"),{Field2:TextInput1.Text})
 
This is a sample expression which you can modify based on your condition. Here, Gallery1 is the name of my editable gallery, while DataSource is the name of my datasource and since we are passing a reference to all gallery items, we can use the controls inside gallery to perform actions on each item.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Community Support Team
Community Support Team

Re: Creating a gallery with forms linked to Sharepoint/Excel

Hi @anmdf ,

Could you please share a bit more about your scenario?

Do you want to list all records of your SP List or Excel table using a Gallery control, and want to make the Gallery acts like a Editable Excel table?

 

If you want to list all records of your SP List or Excel table using a Gallery control, and want to make the Gallery acts like a Editable Excel table, please check and see if the following video would help in your scenario:

https://www.youtube.com/watch?v=O2WqhRTUhyw

 

I have made a test on my side, please take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

 

4.JPG

 

If you want to edit/approve multiple items within the Gallery at the same time, you could consider select the Checkbox within the Gallery, then set the OnSelect proeprty of the "Mul-Updates" button which outsides the Gallery to following:

ForAll(
       RenameColumns(Filter(Gallery1.AllItems,Checkbox1.Value=true),"ID","ID1"), 
       Patch(
            '20190325_case13', 
            LookUp('20190325_case13', ID = ID1), 
            {Title: TextInput1.Text, ProjectName: TextInput2.Text, DueDate: DatePicker1.SelectedDate}
        )
)

On your side, you should type:

ForAll(
       RenameColumns(Filter(Gallery1.AllItems, Checkbox1.Value=true),"ID","ID1"), 
       Patch(
            'YourSPList', 
            LookUp('YourSPList', ID = ID1), 
            {
Title: TextInput1.Text,
Column2: TextInput2.Text,
Column3: DatePicker1.SelectedDate,
...
} ) )

The screenshot as below:5.JPG

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: Creating a gallery with forms linked to Sharepoint/Excel

Hi @anmdf 

 

For the remaining steps, you can follow the steps:
 
1) Instead of using labels in your Gallery, use Text Inputs and set the default value property to current record value.
2) Now since you have text Inputs, you can easily allow the user to edit it.
3) You can add a bulk edit button outside the gallery, which iterates over all gallery records, and submits the details.
 
Expression: 
ForAll(Gallery1.AllItems, Patch(DataSource,Lookup(DataSource,Field1 = "Value1"),{Field2:TextInput1.Text})
 
This is a sample expression which you can modify based on your condition. Here, Gallery1 is the name of my editable gallery, while DataSource is the name of my datasource and since we are passing a reference to all gallery items, we can use the controls inside gallery to perform actions on each item.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Community Support Team
Community Support Team

Re: Creating a gallery with forms linked to Sharepoint/Excel

Hi @anmdf ,

Could you please share a bit more about your scenario?

Do you want to list all records of your SP List or Excel table using a Gallery control, and want to make the Gallery acts like a Editable Excel table?

 

If you want to list all records of your SP List or Excel table using a Gallery control, and want to make the Gallery acts like a Editable Excel table, please check and see if the following video would help in your scenario:

https://www.youtube.com/watch?v=O2WqhRTUhyw

 

I have made a test on my side, please take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

 

4.JPG

 

If you want to edit/approve multiple items within the Gallery at the same time, you could consider select the Checkbox within the Gallery, then set the OnSelect proeprty of the "Mul-Updates" button which outsides the Gallery to following:

ForAll(
       RenameColumns(Filter(Gallery1.AllItems,Checkbox1.Value=true),"ID","ID1"), 
       Patch(
            '20190325_case13', 
            LookUp('20190325_case13', ID = ID1), 
            {Title: TextInput1.Text, ProjectName: TextInput2.Text, DueDate: DatePicker1.SelectedDate}
        )
)

On your side, you should type:

ForAll(
       RenameColumns(Filter(Gallery1.AllItems, Checkbox1.Value=true),"ID","ID1"), 
       Patch(
            'YourSPList', 
            LookUp('YourSPList', ID = ID1), 
            {
Title: TextInput1.Text,
Column2: TextInput2.Text,
Column3: DatePicker1.SelectedDate,
...
} ) )

The screenshot as below:5.JPG

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
anmdf
Level: Powered On

Re: Creating a gallery with forms linked to Sharepoint/Excel

Hi @yashag2255 @v-xida-msft many many thanks for your suggestions! It worked for me Smiley Happy 

 

I would like to ask on the "select all" portion of my app. I have checkboxes for each of the record in the Gallery, and an "update" button that gets those records with checks and updates them. I made a select all checkbox too. Default of the separate checkboxes is

 

If(SelectAllCheckbox.Value = true, true, false)

 

It works. But then I wanted to filter my Gallery using a dropdown box with values from a column in the Gallery. The filter itself works, but when I tried updating records with checkboxes... it updates all the filtered data, even those with unchecked checkbox.

 

I also would want the "Select All" option to work only on the filtered data, but I am lost as to how huhu

 

I hope this makes sense. (Let me know if I should make a separate post for this query)

 

Thanks again! Smiley Happy 

 

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 275 members 4,797 guests
Please welcome our newest community members: