web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 5v6XfwdCODHaCHKljbpJzN
Power Apps - Building Power Apps
Unanswered

building a Power App to create a new Project and dynamically add new tasks

Like (0) ShareShare
ReportReport
Posted on 29 Jul 2021 01:39:48 by 3,502

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:-

 

Pic.png

 

 

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

  • PaulD1 Profile Picture
    2,914 on 01 Aug 2021 at 21:31:44
    Re: building a Power App to create a new Project and dynamically add new tasks

    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.

  • johnjohn123 Profile Picture
    3,502 on 29 Jul 2021 at 08:56:57
    Re: building a Power App to create a new Project and dynamically add new tasks

    @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?

  • PaulD1 Profile Picture
    2,914 on 29 Jul 2021 at 02:58:31
    Re: building a Power App to create a new Project and dynamically add new tasks

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete