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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Program Power Apps For...
Power Apps
Answered

Program Power Apps Form Button to create new SharePoint list item

(1) ShareShare
ReportReport
Posted on by 13

I'm new to Power Apps so I need some assistance with a task that may be very simple.  I have created a form for a SharePoint list that includes a DataTable that is populated with items from a second SharePoint list.  I would like to add a button that can be used to add items to the second SharePoint list.  The form looks something like this:

 

Screen Shot 1.jpg

 

The lower part of the form is the DataTable that is populated with items from the second SharePoint list.  I would like the "Add Item" button to open up a form for creating a new item in the second SharePoint list.

 

I assume that the correct place to add the code is the OnSelect field in the ACTION section for the button.  I'm just getting stuck finding the correct code.

 

Thanks for your help!

 

Screen Shot 2.jpg

Categories:
I have the same question (0)
  • PaulD1 Profile Picture
    2,914 on at

    You'll want to use the Patch function:

    Patch([SharePointList], Defaults(SharePointList),
    {Field1: Value1,
    FIeld2, Value2,
    ...
    })

    SharePointList is the list you are patching (inserting) into.

    Field1 is the name of a field in that list - Value1 is the value you want to set it to. If the Field is PartNumber and the value you want to insert into it is in a label called lblPartNumber then it would be like this:

    {PartNumber: lblPartNumber.Text}

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    @Kjell

    What does it mean when you said: "open up a form for creating a new item in the second SharePoint list"?

    If you mean to open a New Item page from SharePoint,  you can use Launch() function to open it, set the OnSelect of button as below:

    Launch("https://<Domain>.sharepoint.com/sites/<SiteName>/Lists/<ListName>/NewForm.aspx")

    Note: modify the URL to your own New item page.

    StoG_19.gif

    Sik

  • Kjell Profile Picture
    13 on at

    Hi Paul,

     

    Thanks for your reply.  It may not be exactly was I was looking for since I wanted to display the form for creating a new item.  I may have to create items this way as well though so your suggestion is very much appreciated.

  • Kjell Profile Picture
    13 on at

    Hi Sik,

     

    Thanks for your reply.  This does indeed open up the form that I'm looking for.

  • MI2022 Profile Picture
    52 on at

    Hi @Kjell how did you insert the DataTable populated with items from the second SharePoint list?

    I'd like to have the same solution but on the same SharePoint list and filtered.

    Thank you very much.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard