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

 

 

 

2 REPLIES 2
Expiscornovus
Super User
Super User

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



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Anonymous
Not applicable

Hello ,

Would you be able to please post the whole flow here? It is not clear to me where you added this 'Condition'?

 

Also, can one replace 'Project 4' in '*Name' field with the SPO 'Title' value so the bucket is not specific to one input?

 

Thank you,

MC Ski Colorado

 

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,944)