In
the
previous demo, Peter Kalmström, CEO and Systems Designer
of kalmstrom.com Business Solutions, added a rectangular
progress bar that shows how many questions have been answered
and how many remain, to the Power Apps user interface of
the survey.
Here, Peter continues the powerapp survey series with a
demonstration on another kind of progress bar, in the form
of a pie chart. As in the earlier demos, Peter works with
one of the questions/data cards.
For this progress chart, Peter builds a formula that first
clears any collection named ProgressChart and then creates
it again. It has two items, the part Done and the part To
Do. These two items form the two parts of the finished progress
chart.
Peter also uses the CurrentQuestionNumber variable that
was created in an
earlier demo in this serie. The Done part will have
the value of this variable, and the To Do part will have
the value 22 minus this variable, as there are 22 questions
in Peter's survey.
Steps
In Power Apps Studio, insert a pie chart below the
form.
Remove everything in the icon but the pie chart
itself.
Add two formulas to the Back arrow, after the Set
formula:
ClearCollect(ProgressChart, {Part:"Done",Value:CurrentQuestionNumber});
Collect(ProgressChart, {Part:"To Do",Value:CurrentQuestionNumber});
Add the same formulas to the Next arrow, after the
Set formula.
Set the Items property of the pie chart icon to
the collection name, ProgressChart.
Modify the colors so that there is a clear distinction
between the two parts.
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