web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate SharePo...
Power Automate
Answered

Power Automate SharePoint Flow with Condition not working

(0) ShareShare
ReportReport
Posted on by 2

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:

 
Categories:
I have the same question (0)
  • Mike-M Profile Picture
    26 on at

    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

     

     

  • Azenner1 Profile Picture
    2 on at

    @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

  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    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,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard