cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
azmcfarl
Helper I
Helper I

Bucket and task creation with variables from switch case

Hi all,

 

I've written a Flow that does a couple of things including creating a bucket and some predetermined tasks. The flow is triggered by adding an item to a SharePoint List. I have a switch case that depends on a company product code and a few variables. Each product has their own Team, and associated Planner; right now I'm working with 3 Teams and 3 Planners.

 

My issues:

- I'm using the condition 'if a variable = true' in a switch code then create a bucket. However in the run history, the output always false, so no buckets are made.

- I anticipate having an issue making tasks as well because the bucket id will be the newly formed bucket, and I don't know how to extract that id and give it to the task. I thought that maybe I needed a 2nd switch case to set all the variables, but not sure if that's the right direction.

 

Any advice? Thanks in advance!

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @azmcfarl ,

 

So what is the issue in your flow so your flow couldn't work?

Have you checked the flow run history? Could you please share a screenshot of it?

 

I see you flow and find an error in it:

You should check the Create Folder variable is equal to True instead of true, since you have set the variable to True in the set variable action.

 

1.png

2.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @azmcfarl ,

 

Please choose the Id dynamic content from the Create a bucket action:

1.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

11 REPLIES 11
azmcfarl
Helper I
Helper I

Capture.JPG

Capture.JPGCapture.JPG

 

Sorry the original message wouldn't let me attach photos.

v-alzhan-msft
Community Support
Community Support

Hi @azmcfarl ,

 

Multiple questions:

1. Please share the full screenshot of your flow in order。

2. You say You use the Condition to check if the variable is equal to true, but I don't see any action in your flow that would set the variable to true.

3. What is the requirement in your flow, could you please explain more details? 

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Alice,

 

Here's the full Flow.

 

I would like to use the Flow as follows:

I have products A, B, C, etc. and would like to be able to manage their product deviation status with tasks. Each product has their own Team and Planner. When a product deviation is created in our SharePoint list, I need the Flow to create a bucket in the respective product Team's Planner. The name of the bucket should be based on a SharePoint field (deviation number and description) I then want to create a standard list of tasks to populate that bucket. The task title should have the deviation number in it (Sharepoint field), plus whatever the task is (ex: risk assessment drafted).

Capture.JPGCapture.JPGCapture.JPGCapture.JPGCapture.JPGCapture.JPG

 

 

 

 

Hi @azmcfarl ,

 

So what is the issue in your flow so your flow couldn't work?

Have you checked the flow run history? Could you please share a screenshot of it?

 

I see you flow and find an error in it:

You should check the Create Folder variable is equal to True instead of true, since you have set the variable to True in the set variable action.

 

1.png

2.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

I ended up putting another switch case in since I needed 3 group and plan ids, plus switched the initialize variable position like you suggested and I have buckets now!

 

My last thing is, how do I now create the tasks? The 'create a task' needs a bucket ID, and all I have is a bucket name from my newly formed bucket. Capture.JPG

Hi @azmcfarl ,

 

Please choose the Id dynamic content from the Create a bucket action:

1.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Alice,

 

That id shown in your picture wasn't showing up for me before, I think because I had it under a switch case in a condition, and task was in a separate condition. I combined the two, and it looks like it works. Thank you for all your help! It has been fantastic.

 

Final question, is it okay that all of this is nested under one condition?

 

Capture.JPG

Hi @azmcfarl ,

Yes, it is ok.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much!
v-alzhan-msft
Community Support
Community Support

Hi @azmcfarl ,

 

If your problem has been solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I get an authentication error when I select accept as solution, and I've tried 3 different browsers, but this absolutely did work. 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (915)