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.
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')
2. Add the create bucket to the Yes branch
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?
MC Ski Colorado