In
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
Duplicate the existing Details screen.
Delete the form in the new screen.
Delete the form connected part of the Accept icon
formula.
Insert a Text label and give it the text Title.
Insert a Text input.
Copy the label and give it the text Instructions.
Insert a Rich text editor.
Create a formula for the Accept icon: Set(SavedSPItem,
Patch([listname],Defaults([listname]), {Title:[Input
name].Text,Instructions:[Rich text editor name].HtmlText)).
Add a semi-colon before the Navigation formula,
which takes the user back to the Browse screen and is
kept from the copied screen.
Insert a button.
Make the selected button navigate to the new screen.
Learn more
Software that enhances SharePoint
Kanban Task Manager Visualize and co-operate on projects and tasks in SharePoint
and/or Outlook
Pivot Explorer Visualize and analyze list data in SharePoint
Templates Manager
Find, use, manage and distribute Office templates in SharePoint