In
the demo below, Peter Kalmström continues to work with the
Recurring Tasks solution that he has used in several previous
demos already. Here, Peter creates an app for the tasks
that are due today and have not yet been finished.
The app shows today's tasks from the Excel Tasks table,
and when a task has been finished, the user can tap a Check
icon to mark it as "Done". That info goes back to the Status
field in the Tasks table. In the app, the finished tasks
will be filtered out, so that the app always shows only
tasks that are not yet performed.
In this demo, Peter does nothing to enhance the look of
the app, as this is easily done with the built-in Power
Apps tools. Instead, Peter focuses on function, which might
be more difficult to achieve. He adds a heading and a gallery
to the blank app, connects the gallery to the Excel Tasks
table and changes the default layout and formulas, so that
the app works as intended.
All steps to create the app are performed in the Power Apps
Studio at
https://make.powerapps.com.
Changes to the tasks in the gallery are made for all of
them in the first instance.
In Power Apps, create a blank canvas app with the
phone format.
Add a text label, Open Recurring Tasks, on top.
Add data from Excel Online (Business) and connect
to the dataset in SharePoint or OneDrive where the Recurring
Tasks Excel worksheet is stored. Select the Recurring
Tasks file.
Choose to connect to the Tasks table and use the
unique ID column in that table. (Refer to the
previous article.)
Insert a vertical gallery below the label and connect
it to the Tasks table data source.
Change the gallery layout to Title and subtitle.
Edit the fields, so that the subtitle shows the
Date value in the Tasks table and the title shows the
Title value.
To show the dates in a suitable format, select the
date field and change its Text formula into: Date(ThisItem.Date),Month(ThisItem.Date),Day(ThisItem.Date)
Replace the Next icon with a Check icon.
To update the Tasks table and add a Done value to
the checked item's Status column, change the Check icon's
OnSelect formula into: Patch(Tasks,ThisItem,{Status:"Done"})
Play the app and check one of the tasks as finished.
Make sure that the task's Done value has been propagated
to the Excel Tasks table.
To filter out the checked tasks, select the gallery
and change its Items property into: Filter(Tasks,IsBlank(Status))
Test the app by checking one of the remaining tasks
and making sure that it disappears from the app.
In the
next demo, Peter will get more info from the powerapp
to the Excel Tasks table without burdening the app users.
Date formats
When you watch the demo, you will probably notice that the
dates have different formats in Excel and the powerapp.
In Excel, the dates are in ISO format, YYY-MM-DD, while
the app shows them in the US format, MM/DD/YYYY. If you
have another date format than the ISO on your system, you
will see the same difference if you follow Peter's instructions.
Here is the explanation:
Peter is doing some code based manipulation of the dates
in Excel, and therefore he wants them to be displayed as
ISO format. Other formats tend to introduce confusion. In
the powerapp the date format is the default system date,
and on Peter's computer that is the US date format, not
the ISO.
The Excel back-end is intended as a database layer that
is mostly used by admins. They will enter new templates
and modify intervals etc. and will most likely be ok with
the ISO format. In Power Apps, there is no code based date
manipulation, so keeping the locale default format is better
for the app users.
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