SOLVED

How to create multiple “task” items using PowerApps

Deleted
Not applicable
We want to add add a workforce task management app to our intranet, hopefully with PowerApps. This is how it would work. In a SharePoint list, we would add a task that we expect each store to complete e.g. Update Prices. Then we want to trigger the creation in another list of one duplicate task per store. So 200 stores, 200 tasks, each assigned to a store. Employees of those stores are part of their store’s Office 365 Group. Previously we’d use a SharePoint Designer workflow, but that creates SharePoint Tasks and those cannot be customized with PowerApps and are not as mobile friendly as we’d like. So we are thinking we will leverage a Custom List with typical Task fields. Are there any ideas for low code/no code ways to generate the individual store tasks in a custom list? I don’t see any obvious way to to this with Flow.
6 Replies

The "big brother" of flow is Logic Apps, you can set Logic Apps to do something when a list item is created, and that thing would be to create list items in all the other lists. 

The process could be:

1. Add a task to a sharepoint list using PowerApps.

2. LogicApps watches that list and starts when an item is created

3. LogicApps has a step for each other list to add a copy of this item

 

An alternative which would require PowerShell code would be to create a Automation Runbook to do the same steps as the logic app above using something like the SharePointSDK module. To kick this off SharePoint would need to activate a webhook in Azure Automation.

 

And a third option would involve the most code and that would be to create a C# function in Azure functions / app services to do the same sort of this, this however could be registered as a custom API in PowerApps and you can trigger that based on a click rather then on the creation of a item in a sharepoint list.

Peter
Sleep eludes me so here is what I am thinking. Using third party products and coding may be what I resort too, but I want to challenge what PA can do here.
Say I have 3 data connections to SharePoint:
1/ the task input list - used to create a task that will be distributed to stores
2/ a list of stores
3/ the task list (another custom list)

Now the process:
1/ In PowerApps an Input Task item is created and saved.
2/ A button runs a ForAll function for each item in the Store List. It creates a table (collection?) with the Store Number plus the field from the input task list.
3/ this populated table is displayed in a gallery control, which functions as a preview and where we can change a task or due date here and there if there are any exception stores.
4/ another button kicks off another ForAll that will create an item for each table row/record in the third data connection, which is the actual task list.

I could use PA for that third list to ensure the only field a store can edit is the Status field. Probably graphs/reports can be made in PA to track progress of completion and flow can send reminders.
Seems doable from what I see PA can do.
Thoughts?
best response
Solution
Yes that is possible, but I sorry when you said multiple stores I thought you might be using multiple destination lists. The command you want in the forecast is patch.

Roland,

 

Have you tried using Planner at all. A planner Instance with each Store as a Bucket. Create a new Task for each Bucket using Flow. This would then surface on the Planner Hub and assign Tasks to individuals.

I'd use Planner if I could lock down everything except allow the user to only see their own store's tasks and only be able to select "Done". We need to issue task in bulk and then ensure nothing gets changed. 

Meanwhile, I have managed to create a working prototype to prove the concept. 

 

I start with an Input list where a Home Office person will issue the task and assign it to a group of stores. 

Then, I have a button using ClearCollect and ForAll against a table of stores to create a table of tasks with one row per store. That is displayed in a gallery for a preview. 

Then, a button uses another ForAll and a Patch function to write it all into a SharePoint List which will function as the Task list. I will secure these with a workflow so that stores can see only their own tasks. A simple PowerApp form will give them only the option to check it as done and probably some comments. 

 This is all to me quite amazing considering this is something we likely would have purchased a third party product for (and we still might, if I don't perfect it...but I suspect I will).

Hi there, Roland. I have a similar need and came across your post! Were you able to perfect this? If so, any more insight?

Thanks so much!
1 best response

Accepted Solutions
best response
Solution
Yes that is possible, but I sorry when you said multiple stores I thought you might be using multiple destination lists. The command you want in the forecast is patch.

View solution in original post