cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
moises_martinez
Level: Power Up

Can I add an Edit Form into a gallery?

Hi everybody.

 

Can I add an Edit Form into a gallery?

I have a Table [Id, Team, Active] and I want to change Active fields directly from Gallery. Is it possible???

 

Thank in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Level 10

Re: Can I add an Edit Form into a gallery?

Yes you can and easily, no need to use forms.

What kind of flield is Active?  Is a true/false?  In the rest of my reply I will assume it is.

 

Here is one idea:

 

1) Insert a toggle control in the gallery and set its Default property to ThisItem.Active

2) Set the toggle's OnChange property to Patch(YourDataSource, ThisItem, {Active: !ThisItem.Active}) or Patch(YourDataSource, ThisItem, {Active: ThisItem.Toggle1.Value}) or something like it

 

That is it!

 

Please let me know if this works and if not, what issues you encounter.

View solution in original post

11 REPLIES 11
Community Support Team
Community Support Team

Re: Can I add an Edit Form into a gallery?

Hi Moises_martinez,

 

Gallery is a control that contains other controls and shows a set of data. We can use it browse for a record. If you want to edit and create a new record, an Edit Form would be needed. So it may not be possible to edit the fields directly from a gallery.

 

You could add two screens on your App, then add a Gallery control on Screen1, an Edit Form control on Screen2. Then you could show all the data on the Gallery and edit the data on the Edit Form.

 

I have seen an article about “Understand data forms in Microsoft PowerApps”, hope this could be a reference for you:
https://powerapps.microsoft.com/en-us/tutorials/working-with-forms/


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Meneghino
Level 10

Re: Can I add an Edit Form into a gallery?

Yes you can and easily, no need to use forms.

What kind of flield is Active?  Is a true/false?  In the rest of my reply I will assume it is.

 

Here is one idea:

 

1) Insert a toggle control in the gallery and set its Default property to ThisItem.Active

2) Set the toggle's OnChange property to Patch(YourDataSource, ThisItem, {Active: !ThisItem.Active}) or Patch(YourDataSource, ThisItem, {Active: ThisItem.Toggle1.Value}) or something like it

 

That is it!

 

Please let me know if this works and if not, what issues you encounter.

View solution in original post

moises_martinez
Level: Power Up

Re: Can I add an Edit Form into a gallery?

It's great!!! Thank for your idea!!!

Super User
Super User

Re: Can I add an Edit Form into a gallery?

Is that solution delegable?  I have found that once I exceed the 500 record limit UpdateIF fails and Patch only works when adding new records

Meneghino
Level 10

Re: Can I add an Edit Form into a gallery?

hi @leyburn19

I believe it is delegable if your data source is delegable.

What is your data source?

Anonymous
Not applicable

Re: Can I add an Edit Form into a gallery?

CapturePO1.PNG

 

This patch function on a slider seem to be working fine on a Sharepoint list, but I have not tested with a large list.

 

OnChange = Patch(Timeforing, First(Filter(Timeforing, ID=ThisItem.ID )), {Innsendt:true} )

 

- "Timeforing" is the Sharepoint list

- "Innsendt" is the boolean field that is set to true

 

(I have not been able to let the slider show the actual value of the field, but the "Send Inn" slider removes the item from the list intentionally by filtering, so it is not a problem.)

Filter for the browsegallery that only shows records for the logged on user where Innsendt=false:

Filter(Timeforing, Author.Email = 'Office365-brukere'.MyProfile().Mail && Innsendt=false)

 

 

 

Vandkunst
Level: Powered On

Re: Can I add an Edit Form into a gallery?

I don't seem to be able to add control to my SoftView gallery. The control stays outside of the gallery. Do you have any idea? Thanks in advance.

Screen Shot 2018-03-03 at 19.28.09.png

 

Super User
Super User

Re: Can I add an Edit Form into a gallery?

It is a sharepoint list which has many issues with delegation. That has been improved with et manually raise to 2000.  A work around for this is to have a hidden form with matching control based on te Gallery.selecet.  The fields defaults on the form set to match variables which have the results of the controls in the gallery.  The only issue is the gallery row must also have a submit form step

ElijahLapson
Level: Powered On

Re: Can I add an Edit Form into a gallery?

Hi there Vandkunst. I believe you must select an object/control in the Gallery and then insert a control.

powerappsinsertintogallery.pngInsert control into a Gallery

There are lots of little things like this in Powerapps I have found so far. Hope this helps.

 

Elijah

 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,467)