cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Edit gallery and add new rows

Hi everyone,

 

I created a repeating table using gallery for my work packages with several items.

I found a way to edit an existing work package via gallery.

I displayed a package names via gallery – after selecting one it leads me to another gallery which is filtered and shows me only the belonging items:

 

Filter('Arbeitspakete Items';AP_x002d_ID='Gallery Auswahl Arbeitspaket'.Selected.ID)

 

To edit the items I put this on the OnChange property of the items inside my gallery:

 

Patch(' Arbeitspakete Items';ThisItem;{Title:InputTitel.Text;Prio:'Input Prio_1'.Selected})

 

this works!

But I also want to add another row to my gallery to add items to my work package via button. This is where I am totally stucked.

I cant take the function of my button in my “create a new work package screen” because the gallery there is connected with my collection items. The gallery in my “edit screen” is connected with my sharepoint list items.

This is the function of my button in my “create a new work package screen”:

 

Patch(Items;ThisItem; {LineTätigkeitBezug:InputTitelTätigkeitBezug.Text;LinePrio:'Input Prio'.Selected.Value});;Collect(Items; {LineTätigkeitBezug:""; LinePrio:"" })

 

 

Actually I want to edit an existing work package like I used to create it in a gallery. Does anyone has an idea for this?

Thank you very much!

1 ACCEPTED SOLUTION

Accepted Solutions

@Jasmin_Sch 

I believe I have come up with a solution for you.  It involves a hidden form behind a gallery but it is much easier to work with than you are currently doing. The formulas for the Items property of the gallery are shown above it. The gallery is sorted descending by its ID by default so that a blank row will appear at the top of the form. There is a single text box that will filter for company name, city and state. There is a save icon that submits a form and a trashcan icon for deleting the row.1.jpg

 

 

 

 

 

 

 

 

The form is on the same screen (it doesn't have to though) and is hidden.  The user will never see it and it contains all of the fields in the gallery. The dataset is the same as the gallery and the Item property is Gallery1.Selected.  Each control (textinput box in the cards of the form has its default property set to reflect the text in the gallery's control if it is edit mode.  When the Blank row button is pressed, the underlying dataset is patched using a single  blank field and the Defaults() element of Patch().  The blank field will appear at the top of the form.  As the user fills the fields in the gallery, the entries are mirrored in the form.  When the save button is pressed, the form is submitted with all the values entered from the gallery.  If the user doesn't complete the entry, they can come back and edit it again and save it.  There is no need for any complicated patch formulae, collections or variables.2.jpg

 

 

 

 

 

 

 

 

 

The inspiration for this solution is from @RandyHayes brilliant video Forms Plus found here   https://www.youtube.com/watch?v=w724AECyMxo where a "ghost" form is used for submitting data, maintaining all of the built in features of the OOB edit form for the app.  There is much more in this video and I can't recommend it highly enough.  It really changed my approach to app design!

View solution in original post

14 REPLIES 14
v-albai-msft
Community Support
Community Support

Hi @Jasmin_Sch ,

What do you mean about “put this on the OnChange property of the items inside my gallery”? Do you mean that you have added a TextInput control inside your gallery and you are now editing its OnChange property?

Do you have two screens and each screen has one gallery? Which gallery do you want to customized?

Actually, I cannot understand your scenario and your requirement from your current information. Please provide more screenshots about your two gallery and it is better if you can give mesome example based on the data from your screenshots.

Best Regards,

Allen

@v-albai-msft Thank you so much for trying to help me on this complicated topic. You are right, my description is very hard to understand. That is why I made you a description in a attached pdf.

 

What I want at the end: I want to edit an existing work package in the same layout/form using gallery as it is in the „new work package screen“.

But how can I save the changes I made (put them into my collection) and add a new row?

 

I hope I could make myself clear now :):)

Thank you!!!!!

@v-albai-msft 

PS

I limited the functions in my pdf to 2 items (Action Item and Projekttyp) to make it easier to read through....:)

@v-albai-msft @Can you please help me with this? 

@Jasmin_Sch , if you're trying to Patch a new record, the second argument of the Patch function needs to be "Defaults(Items)", I believe. I might be missing your point, though.

@Jasmin_Sch 

Have you seen @RezaDorrani 's video? He addresses this issue. https://m.youtube.com/watch?v=8I0Pt_8I6k8 

@RezaDorrani @Drrickryp @Spamrancher 

thank you for answering!

I already tried to implement this video but it doesn’t work or I just can’t figure out how to model it ... I desperately start to give up on this now. I did a complete repeating table form exactly as in Shane youngs Video Part 1 (https://m.youtube.com/watch?v=xgznk4XlPCo)
basically I want a combination out of Youngs Video how to edit a repeating table (part 2) and @RezaDorrani Video. So when I am choosing my existing work package and want to edit it again and move to my edit screen (just like in Shane’s Video) I want to see my items in a gallery and edit them (like in Rezas Video)....

@Jasmin_Sch 

 

So you need a mixture of Reza and Shane 🙂

Not sure if that exists LOL.

 

I just released a new video today on editable grid using Dataverse for Teams. Video description includes link to download solution package to import into Dataverse for Teams. You can install and see the entire code base.

https://youtu.be/vRn7br2OaxE

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

 

 

@Jasmin_Sch 

I believe I have come up with a solution for you.  It involves a hidden form behind a gallery but it is much easier to work with than you are currently doing. The formulas for the Items property of the gallery are shown above it. The gallery is sorted descending by its ID by default so that a blank row will appear at the top of the form. There is a single text box that will filter for company name, city and state. There is a save icon that submits a form and a trashcan icon for deleting the row.1.jpg

 

 

 

 

 

 

 

 

The form is on the same screen (it doesn't have to though) and is hidden.  The user will never see it and it contains all of the fields in the gallery. The dataset is the same as the gallery and the Item property is Gallery1.Selected.  Each control (textinput box in the cards of the form has its default property set to reflect the text in the gallery's control if it is edit mode.  When the Blank row button is pressed, the underlying dataset is patched using a single  blank field and the Defaults() element of Patch().  The blank field will appear at the top of the form.  As the user fills the fields in the gallery, the entries are mirrored in the form.  When the save button is pressed, the form is submitted with all the values entered from the gallery.  If the user doesn't complete the entry, they can come back and edit it again and save it.  There is no need for any complicated patch formulae, collections or variables.2.jpg

 

 

 

 

 

 

 

 

 

The inspiration for this solution is from @RandyHayes brilliant video Forms Plus found here   https://www.youtube.com/watch?v=w724AECyMxo where a "ghost" form is used for submitting data, maintaining all of the built in features of the OOB edit form for the app.  There is much more in this video and I can't recommend it highly enough.  It really changed my approach to app design!

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,199)