We have 2 SharePoint lists Projects & Tasks. The Task list has a lookup field to the Projects list. Now we want to create a Power app which allow us to create a new Project and its Task, something as follow:-
so the user create new item >> enter the project name, start& end date >> will have 6 free fields to enter tasks with the option to dynamically create additional tasks (beside the 6 tasks fields that will show by default) ..
is this type of master details interactions supported inside Power Apps and how we can create them?
Thanks
You could base your Gallery on a collection, adding a field for SortOrder and a field for a 'New' flag. When you hit the Add Task button add (patch) a new row to the collection and use a Sort Order that will ensure it appears at the bottom (if you want this so act like Access where new records are added at the bottom).
Make the controls that show the fields in your Collection text boxes (or dropdowns or whatever is required for data entry, just no labels as they can't be edited). For the existing records put these in DisplayMode = View (unless you want them to be editable).
For the new row the controls will need to be in DisplayMode = Edit (you can make this conditional on your 'New' flag). You may also want a 'save' button that displays on the Row when in Edit mode. In the OnSelect of the Save, Patch the entered values back to your datasource then rebuild the collection on which the Gallery is based.
However, that is a lot of effort to build and maintain, so I would not go down that route, rather, when the user hits 'Add New Task' just show the relevant fields on the screen (not in the gallery).
Trying to make one system (Power Apps) look/work like another system (Access) is a lot of unnecessary work IMO, accepting that each system has its own variations and limitation and working to that will make life much easier.
@PaulD1 Ok thanks for the reply and help.. now i can store the parent id inside the child list instead of using lookups this should not be a problem in my case.. but i am still not sure how i can build the layout as shown in the picture? is there any supported documentations?
Working with complex columns from SharePoint in PowerApps is a bit a pain, so much easier to just store the ID of the task rather than a lookup to the task, however, it can be done once you know how (using the '@odata.type' syntax):
{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:Gallery1.Selected.ID,
Value:Gallery1.Selected.Title}
Some resources below:
Solved: How to patch a SharePoint Lookup Column - Power Platform Community (microsoft.com)
PowerApps SharePoint Complex Columns - Patch person, choice, and lookup fields - Bing video
As for the layout - probably easiest to have a row of data entry fields to add one task and as you add it, the task is shown in a gallery below and the data entry fields are cleared ready for the next entry.
You can build something that looks/works a bit like an Access datatable view with the tentative append record at the bottom, but it is a lot of manual code.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473