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

How to add an item to a Sharepoint List without a form?

I have a simple list with the following columns: Firstname, Lastname, Emailaddress. 

I've manually built a form in PowerApps that include the text fields: Firstname, Lastname, Emailaddress and a Submit button. 

 

I know I can use the Customize with Power Apps option in SP. I want to create my own form with three text fields and one submit button - because that should be a very simple thing to do and I should know how to do it. I'm sure the instructions are straight forward and readily available but I'm having a hard time finding anything other than "building a form" and "build a simple form" that both utilize the built in Form screen.   

 

So, what's the string to something like,

OnSelect: MySharePointList (NewItem [Firstname(firstname.text), Lastname(lastname.text), Emailaddress(emailaddress.text)]). 

Obviously I'm lost with how to build a formula.  

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@anthonys123 

You can use the following to create a record:

Patch(yourDataSource, 
    {FirstName: firstname.Text,
     LastName: lastname.Text,
     Emailaddress: emailaddress.Text
    }
)

 

Since you are not specifying the ID of the record, Patch will know to create the record.

 

Make sure you are providing any required column values as well.

 

Note: you will see some show doing this with the Defaults function...however, it is not needed.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@anthonys123 

You can use the following to create a record:

Patch(yourDataSource, 
    {FirstName: firstname.Text,
     LastName: lastname.Text,
     Emailaddress: emailaddress.Text
    }
)

 

Since you are not specifying the ID of the record, Patch will know to create the record.

 

Make sure you are providing any required column values as well.

 

Note: you will see some show doing this with the Defaults function...however, it is not needed.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
anthonys123
Helper IV
Helper IV

Perfect! I wouldn't have thought of Patch. Thank you so much for the quick response. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,646)