cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aurora12234
Helper I
Helper I

Create A Record Without A Form In Power Apps Using PATCH

Hi Experts, 

 

Really appreciate your help on this. Is there any way to create a record in excel or sharepoint list without using a form in powerapps with 'patch'? I did not connect my powerapps to data source like excel or sharepoint list because I needed my powerapps to be in special formats. Please let me know if you have any ideas on how this could work! 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @aurora12234 ,

Note that the xxxx refers to the valid output of the dropdown (Value/FieldName/Result) - I have a blog that may assist you here.

Patch(
   RequestCriteria,
   Defaults(RequestCriteria),
   {
      Name:TextInput1.Text
      LOB:Dropdown1_2.Selected.xxxx,
      'Commodity Type': Dropdown1_1.Selected.xxxx,
      'Part/CFG Description':TextInput1_1.Text,
      'Expected Launch/RTS':DatePicker1.SelectedDate
   }
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

8 REPLIES 8
WarrenBelz
Super User III
Super User III

Hi@aurora12234 ,

The Syntax is 

Patch(
   DataSource,
   Defaults(DataSource),
   {
      Field1: ControlName1Value,
      Field2: ControlName2Value
       . . . .  . . . 
   }
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@WarrenBelz Thanks for your answer! This is my PowerApps currently, should I include patch coding on 'submit' button (on select)? How can I connect this 'submit' button to sharepoint list or excel?

 

 

 

@aurora12234 ,

You can run it off any button/icon or Event - the DataSource is your table/list name.

@WarrenBelz Got it. Am I supposed to connect any sharepoint list table beforehand? Or it will automatically detect my table/list just by inserting data source (table/list name)? Thanks so much for your help once again

@aurora12234 ,

You need to connect to the data source beforehand.

@WarrenBelz Noted, I've connected my datasource, could you please advise if I have any errors, it's not working from my end.

 

Patch(
RequestCriteria,
Defaults(RequestCriteria),
{Name:TextInput1.Text},
{LOB:Dropdown1_2.SelectedText},
{'Commodity Type': Dropdown1_1.SelectedText},
{'Part/CFG Description':TextInput1_1.Text},
{'Expected Launch/RTS':DatePicker1.SelectedDate});

 

Navigate('Results Summary', ScreenTransition.Fade)

 

 

---------------------EOM

 

 

 

Hi @aurora12234 ,

Note that the xxxx refers to the valid output of the dropdown (Value/FieldName/Result) - I have a blog that may assist you here.

Patch(
   RequestCriteria,
   Defaults(RequestCriteria),
   {
      Name:TextInput1.Text
      LOB:Dropdown1_2.Selected.xxxx,
      'Commodity Type': Dropdown1_1.Selected.xxxx,
      'Part/CFG Description':TextInput1_1.Text,
      'Expected Launch/RTS':DatePicker1.SelectedDate
   }
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Hi @WarrenBelz really appreciate your help on this! I've tried inserting everything but it has errors shown as below. (also attached my sharepoint list for your reference) Please advise if I've done anything wrong.

 

 

 

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

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