Home >Tips >Power Apps >New items, Patch kalmstrom.com site map icon Site map  

Create New SharePoint Items from Canvas App

Patch Function

Microsoft Power Apps iconIn the previous demo, Peter Kalmström, CEO and Systems Designer of kalmstrom.com Business Solutions, created a screen with a form for new items in a canvas app built on a SharePoint list for tasks.

In the demo below, Peter shows how to create new items using the Patch function instead. The return value of the Patch function is SPItem when items are created in a SharePoint list. Peter creates a formula that saves the new item to SharePoint before navigating back to the previous screen.

The app Peter uses in the demo is the same as in earlier demos about the recurring tasks app, but the aim here is just to show ways to create new SharePoint items from an app.

Steps

  1. Duplicate the existing Details screen.
  2. Delete the form in the new screen.
  3. Delete the form connected part of the Accept icon formula.
  4. Insert a Text label and give it the text Title.
  5. Insert a Text input.
  6. Copy the label and give it the text Instructions.
  7. Insert a Rich text editor.
  8. Create a formula for the Accept icon: Set(SavedSPItem, Patch([listname],Defaults([listname]), {Title:[Input name].Text,Instructions:[Rich text editor name].HtmlText)).
  9. Add a semi-colon before the Navigation formula, which takes the user back to the Browse screen and is kept from the copied screen.
  10. Insert a button.
  11. Make the selected button navigate to the new screen.



Learn more





back icon next icon
Products Buy FAQ Services Tips Books Contact About Us Tools

Security and integrity

Copyright  Kalmstrom Enterprises AB  All rights reserved