cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jasmin_Sch
Helper IV
Helper IV

Display all items of repeating table to edit using galery

Hi everyone,

 

I created a repeating table with power apps with the help of Shane Youngs video: https://www.youtube.com/watch?v=xgznk4XlPCo

 

I came that far that I can now successfully create a new work package with multiple items.

Of course the user should be able to edit or view a work package. Considering Shanes video I want to select the title of a specific work package using a gallery which is connected to my masterlist (Titles). But then I want the app to show me all items of the selected title like it used to be in the screen “Create new work package” before submitting it (see pic below).

 

Actually I want the “Edit and view” screen to look exactly the same as the “New work package” (pic) screen + drop down with titles to select which work package and items should be shown.

 

Is this possible and can you please help me with this?

 

Thank you!

D4177BF2-7980-48A1-8B25-90E490593F85.jpeg

6 REPLIES 6
Drrickryp
Super User
Super User

@Jasmin_Sch 

You can use and edit form for that. Edit forms can only show the data from one record and you will need some way to select the record to show in your form.  Normally, it would be a selection from a gallery or datatable but you could use a dropdown like in the screenshot._1.png The Datasource property of the screen is FakeNames, a fictitious contact list.  The Item property of the form is Lookup(FakeNames,ID=Dropdown1.Selected.ID).  The default mode of the form is View.  The icons change the mode of the form to either Edit, New or View.  If the Save icon is chosen, the form is submitted and the OnSuccess property of the form places it back in View mode. 

Jasmin_Sch
Helper IV
Helper IV

@Drrickryp 

Thank you so much!

 

I got quite closer to it with your help!

 

I did a gallery at my start screen connected to my Masterlist which shows all available titles:

OnSelect property:

Navigate('Screen edit and view work package';ScreenTransition.Cover)

 

On my Edit screen I got a edit form as you said connected to my Masterlist:

Item property:

LookUp('3400 ILLU Arbeitspakete Mastersheet';ID='Gallery Auswahl Arbeitspaket'.Selected.ID)

Default property: Edit

 

To submit my changes I got a simple button: SubmitForm('Form Arbeitspaket bearbeiten')

 

I added a gallery collected to my Items List below my form:

 

Item property: Filter('3400 ILLU Arbeitspakete Items';MasterID='Gallery Auswahl Arbeitspaket'.Selected.ID)

 

At first it only showed me the title of my items but I inserted the rest of my items list: ThisItem.'Auswahl Tätigkeit/Bezug'.Value, ThisItem.'Prio'.Value, ThisItem.’Abteilung’,…..

43C95679-B251-4055-91B6-5F6DFFB08BDC.jpeg

And my gallery shows me all my items belonging to my work package.

 

I only got some issues with my save button after every row. In case I wanted to create a new work package and wanted to save and add rows to my gallery it had this function:

Patch(Items;ThisItem; {LineTätigkeitBezug:InputTitelTätigkeitBezug.Text; LineProjekttyp:'Input Projekttyp'.Selected.Value;LineStatus:'Input Status'.Selected.Value;LinePrio:'Input Prio'.Selected.Value;LineAuswahlTätigkeit:'Input TätigkeitBezug'.Selected.Value;LineSoftware:'Input Software'.Selected.Value;LineAbteilungWunschressource:'Input Wunschressource'.Selected.Department;LineAbteilung:'Input Abteilung'.Text;LineWunschressource:'Input Wunschressource'.Selected;LineGJ2021Q1APV:Value('Input GJ21Q1'.Text);LineGJ2021Q2APV:Value('Input GJ21Q2'.Text);LineGJ2021Q3APV:Value('Input GJ21Q3'.Text);LineGJ2021Q4APV:Value('Input GJ21Q4'.Text);LineGJ2022Q1APV:Value('Input GJ22Q1'.Text);LineGJ2022Q2APV: Value('Input GJ22Q2'.Text);LineGJ2022Q3APV:Value('Input GJ22Q3'.Text);LineGJ2022Q4APV:Value('Input GJ22Q4'.Text);LineGJ2023Q1APV:Value('Input GJ23Q1'.Text); LineGJ2023Q2APV:Value('Input GJ23Q2'.Text);LineGJ2023Q3APV:Value('Input GJ23Q3'.Text); LineGJ2023Q4APV:Value('Input GJ23Q4'.Text)});;
 
Collect(Items; {LineTätigkeitBezug:""; LineProjekttyp:"";LinePrio:"";LineStatus:"";LineWunschressource:glbEmptyPerson;LineAbteilungWunschressource:"";LineGJ2021Q1APV:0;LineAbteilung:"" ;LineGJ2021Q2APV:0;LineGJ2021Q3APV:0;LineGJ2021Q4APV:0;LineGJ2022Q1APV:0;LineGJ2022Q2APV:0;LineGJ2022Q3APV:0;LineGJ2022Q4APV:0;LineGJ2023Q1APV:0;LineGJ2023Q2APV:0;LineGJ2023Q3APV:0;LineGJ2023Q4APV:0})

 

I tried to replace the values in my patch function: ThisItem.Title instead of LineTätigkeitBezug and InputTitelTätigkeitBezug_1 instead of InputTitelTätigkeitBezug But it still doesn’t work.

 

What kind of function do I need here to save my changes in the gallery and add new rows.

 

Thank you!

Drrickryp
Super User
Super User

@Jasmin_Sch 

I believe that you have made it unnecessarily complicated for yourself.  (Maybe you have a good reason for doing so).  I redesigned the app without a repeating table using a simple datatable and edit form.  In my example there are only two controls, one for creating a new record and the other for saving the form. I used my fictitious contacts list (FakeNames) for it sorted by last name.  Additional controls can be added outside the datatable to further filter the list. The Datasource for the form is FakeNames  and the Item property is Datatable1.Selected  

Basically, the datatable (it could as easily be a gallery), selects the record to be modified and the form saves it back. The "+" button outside the datatable allows for creating a new record that isn't in the datasource.  A delete button could be added outside the datatable, with the OnSelect property

Remove(FakeNames, Lookup(FakeNames, ID=Datatable1.Selected.ID)) 

 This simple design fulfills the basic requirements for an app  Create, Read, Update, and Delete.

_1.png

That’s a good point. But as far as I know users can not insert data into data tables and it is just used for display purpose. 

So data table was no option for my but gallery to create a repeating table.

Actually I want to, after I have display all items, to edit them or ad rows.

 

 So I hope your can help me 🙂

 

Drrickryp
Super User
Super User

@Jasmin_Sch 

You are correct that a datatable is read only, but modifying and creating records is what the Edit form is for. rubeGoldberg.png

 

@Drrickryp You are right. I tried this as well and put in an edit form. But this was not the layout I wanted. So I can only see or edit the item I have selected.

 

That’s why I asked for the possibility to display all items via gallery instead as it shows while creating a new work package.

Thank you!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,584)