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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,585)