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

Power Automate SharePoint Flow with Condition not working

Hello, I've read through quite a few posts where a condition is not working but haven't found a solution that seems to fit my situation.

 

I want to copy a file to a different library based on metadata.  If the "OU (Distribute To) field contains a 50, copy the file to a particular directory.  Below are screen shots of my flow.  I have one document in my library with that field set to 50 (it is a pick list if that makes a difference).  I have tried using both "OU (Distribute To)" and "OU (Distribute To) Value" in my condition and neither worked.  I tried putting the 50 in single and double quotes, still didn't work. What am I missing?  

 

Thanks much,

Andrea

 

shot1.jpgShot 2.jpg

 

Full Flow:

 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

 

Hi @Azenner1 ,

 

If the type of this field is Choice, then you need to use OU (Distribute To) Value in Condition.

You need to change "is equal to" to "contains".

 

In addition, you can check the Body of the Get files action, whether the value of OU (Distribute To) Value is a number or a string. If it is a string, then you can consider using the string() function to format 50 into a string value.

 

If the value of OU (Distribute To) Value is also number, then you may need to format both OU (Distribute To) Value and 50 as a string value for comparison.

253.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

3 REPLIES 3
New Member

What is the data type of that 50?  Just had a similar item where I had to convert to string in the condition field.  Might be worth a shot?

 

Alternatively, try to initialize a variable as string for the field that is being looked at and use that in your condition, comparing to string('50').  You may also just be able to enter string(*Distribute to Field*) is equal to string('50').  *Distribute to as dynamic content*.

 

I have seen some inconsistencies with flow when using certain fields in the condition content.  Sometimes converting them to Base64 and comparing both values that way will give you insight as to what is actually being looked at.  I just capture this as a variable and send it to myself in an email for easy review.

 

Example from my other post below for converting to string, but it should work similarly in your case (Hopefully?):

 

Condition Control.png

 

 

@Mike-M thanks for the tip.  I added the string parameter and now the flow fails, which is progress I guess.  It's still not finding the document.  The error message isn't terribly helpful "ActionFailed. An action failed. No dependent actions succeeded."

 

shot 3.jpg

Community Support
Community Support

 

Hi @Azenner1 ,

 

If the type of this field is Choice, then you need to use OU (Distribute To) Value in Condition.

You need to change "is equal to" to "contains".

 

In addition, you can check the Body of the Get files action, whether the value of OU (Distribute To) Value is a number or a string. If it is a string, then you can consider using the string() function to format 50 into a string value.

 

If the value of OU (Distribute To) Value is also number, then you may need to format both OU (Distribute To) Value and 50 as a string value for comparison.

253.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (82,024)