cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
YHO
Frequent Visitor

Duplication When Creating Planner Tasks From SharePoint LIst

Hello.  I’m trying to create a Planner Task whenever a new item is added to my SharePoint List.  There is a column in my List called “Bucket” which identifies which Bucket the Task should go in.  If the Bucket already exists in Planner, the Task should be created under that Bucket.  However, if the Bucket does not exist, a new Bucket should be created and a new Task would be created under that Bucket. My flow currently works in that it will direct the new Task to an existing Planner Bucket if it already exists (first column “Project 4” below).  But my problem is, it will create a duplicate set (2nd column “Project 4” below).  I’ve attached my outcome and flow.  Thank you.

YHO_0-1611763291344.png

YHO_0-1611761880692.png

 

YHO_1-1611761940530.png

 

 

 

1 REPLY 1
Expiscornovus
Super User II
Super User II

Hi @YHO,

 

My guess is that second Project 4 bucket is created because of the ToDo bucket or some other additional bucket in the planner plan. In your condition it will be evaluated as ToDo is equal to Project 4. The expression result for that will be No. 

 

I would use an approach were you will search for the name Project 4. When the result of that search is empty I would create a new bucket.

 

Below is an example of such an approach. 

 

1. Add a condition action. Use the following expression to search for the string 'Project 4' by using an indexof function, https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#i.... If the result is -1 it means that it can't find that name. 

 

 

indexof(string(outputs('List_buckets')?['body/value']), 'Project 4')

 

 

indexofsearchforproject4.png

 

 2. Add the create bucket to the Yes branch

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (2,221)